From 2ad5be076e60616da8859cf9deaa4f6fc07126a6 Mon Sep 17 00:00:00 2001 From: chenqi Date: Mon, 22 Jun 2026 09:40:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(db):=20V83=E8=BF=81=E7=A7=BB=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E4=BF=AE=E5=A4=8Dtenant=5Fid=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E8=BD=AC=E6=8D=A2=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V83__fix_duplicate_table_schemas.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V83__fix_duplicate_table_schemas.sql b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V83__fix_duplicate_table_schemas.sql index f893232f3..77d68d66f 100644 --- a/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V83__fix_duplicate_table_schemas.sql +++ b/healthlink-his-server/healthlink-his-application/src/main/resources/db/migration/V83__fix_duplicate_table_schemas.sql @@ -8,7 +8,9 @@ EXCEPTION WHEN duplicate_column THEN END $$; DO $$ BEGIN + ALTER TABLE emr_quality_score ALTER COLUMN tenant_id DROP DEFAULT; ALTER TABLE emr_quality_score ALTER COLUMN tenant_id TYPE BIGINT USING tenant_id::BIGINT; + ALTER TABLE emr_quality_score ALTER COLUMN tenant_id SET DEFAULT 0; EXCEPTION WHEN undefined_column THEN RAISE NOTICE 'emr_quality_score.tenant_id does not exist'; END $$;