Files
simrsx-be/cmd/main-migration/migrations/20251207020537.sql

23 lines
763 B
SQL

-- Create "ApMcuOrder" table
CREATE TABLE "public"."ApMcuOrder" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"McuOrder_Id" smallint NULL,
"Substances" text NULL,
"Fictations" text NULL,
"Localization" text NULL,
"ClinicalDiagnoses" text NULL,
"Stadium" text NULL,
"ClinicalNotes" text NULL,
"PastHistory" text NULL,
"CurrentHistory" text NULL,
"PrevApMcu" text NULL,
"PrevApMcuNotes" text NULL,
"SupportingExams" text NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "uni_ApMcuOrder_McuOrder_Id" UNIQUE ("McuOrder_Id"),
CONSTRAINT "fk_ApMcuOrder_McuOrder" FOREIGN KEY ("McuOrder_Id") REFERENCES "public"."McuOrder" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
);