Merge branch 'dev' of github.com:dikstub-rssa/simrs-be into migration
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
-- Create "ProcedureReport" table
|
||||
CREATE TABLE "public"."ProcedureReport" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Encounter_Id" bigint NULL,
|
||||
"Date" timestamptz NOT NULL,
|
||||
"Doctor_Code" character varying(10) NULL,
|
||||
"Operator_Name" text NULL,
|
||||
"Assistant_Name" text NULL,
|
||||
"Instrumentor_Name" text NULL,
|
||||
"Diagnose" character varying(1024) NULL,
|
||||
"Nurse_Name" character varying(10) NULL,
|
||||
"Anesthesia_Doctor_Code" character varying(10) NULL,
|
||||
"Anesthesia_Nurse_Name" text NULL,
|
||||
"ProcedureValue" text NULL,
|
||||
"ExecutionValue" text NULL,
|
||||
"Type_Code" text NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "fk_ProcedureReport_Anesthesia_Doctor" FOREIGN KEY ("Anesthesia_Doctor_Code") REFERENCES "public"."Doctor" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION,
|
||||
CONSTRAINT "fk_ProcedureReport_Doctor" FOREIGN KEY ("Doctor_Code") REFERENCES "public"."Doctor" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION,
|
||||
CONSTRAINT "fk_ProcedureReport_Encounter" FOREIGN KEY ("Encounter_Id") REFERENCES "public"."Encounter" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
-- Drop "ActionReport" table
|
||||
DROP TABLE "public"."ActionReport";
|
||||
@@ -0,0 +1,2 @@
|
||||
-- Modify "ProcedureReport" table
|
||||
ALTER TABLE "public"."ProcedureReport" ALTER COLUMN "Nurse_Name" TYPE text;
|
||||
Reference in New Issue
Block a user