migration from server

This commit is contained in:
dpurbosakti
2025-11-06 12:17:49 +07:00
parent a2015a5c7e
commit 4e001555bb
80 changed files with 1785 additions and 1785 deletions

No files matched your search

@@ -1,8 +1,8 @@
-- Rename a column from "DischargeMethod_Code" to "Discharge_Method_Code"
ALTER TABLE "public"."Encounter" RENAME COLUMN "DischargeMethod_Code" TO "Discharge_Method_Code";
-- Modify "Encounter" table
ALTER TABLE "public"."Encounter" ADD COLUMN "Discharge_Date" timestamptz NULL;
-- Modify "DeathCause" table
ALTER TABLE "public"."DeathCause" DROP CONSTRAINT "fk_DeathCause_Encounter", ADD CONSTRAINT "fk_Encounter_DeathCause" FOREIGN KEY ("Encounter_Id") REFERENCES "public"."Encounter" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION;
-- Modify "InternalReference" table
ALTER TABLE "public"."InternalReference" DROP CONSTRAINT "fk_InternalReference_Encounter", ADD CONSTRAINT "fk_Encounter_InternalReferences" FOREIGN KEY ("Encounter_Id") REFERENCES "public"."Encounter" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION;
-- Rename a column from "DischargeMethod_Code" to "Discharge_Method_Code"
ALTER TABLE "public"."Encounter" RENAME COLUMN "DischargeMethod_Code" TO "Discharge_Method_Code";
-- Modify "Encounter" table
ALTER TABLE "public"."Encounter" ADD COLUMN "Discharge_Date" timestamptz NULL;
-- Modify "DeathCause" table
ALTER TABLE "public"."DeathCause" DROP CONSTRAINT "fk_DeathCause_Encounter", ADD CONSTRAINT "fk_Encounter_DeathCause" FOREIGN KEY ("Encounter_Id") REFERENCES "public"."Encounter" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION;
-- Modify "InternalReference" table
ALTER TABLE "public"."InternalReference" DROP CONSTRAINT "fk_InternalReference_Encounter", ADD CONSTRAINT "fk_Encounter_InternalReferences" FOREIGN KEY ("Encounter_Id") REFERENCES "public"."Encounter" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION;