update migration
This commit is contained in:
No files matched your search
@@ -1,5 +1,5 @@
|
|||||||
-- Create "ActionReport" table
|
-- Create "ProcedureReport" table
|
||||||
CREATE TABLE "public"."ActionReport" (
|
CREATE TABLE "public"."ProcedureReport" (
|
||||||
"Id" bigserial NOT NULL,
|
"Id" bigserial NOT NULL,
|
||||||
"CreatedAt" timestamptz NULL,
|
"CreatedAt" timestamptz NULL,
|
||||||
"UpdatedAt" timestamptz NULL,
|
"UpdatedAt" timestamptz NULL,
|
||||||
@@ -7,13 +7,23 @@ CREATE TABLE "public"."ActionReport" (
|
|||||||
"Encounter_Id" bigint NULL,
|
"Encounter_Id" bigint NULL,
|
||||||
"Date" character varying(20) NOT NULL,
|
"Date" character varying(20) NOT NULL,
|
||||||
"Doctor_Code" character varying(10) NULL,
|
"Doctor_Code" character varying(10) NULL,
|
||||||
"Operator_Employe_Id" bigint NULL,
|
"Operator_Name" character varying(120) NULL,
|
||||||
"Assistant_Employe_Id" bigint NULL,
|
"Assistant_Name" character varying(120) NULL,
|
||||||
"Instrumentor_Employe_Id" bigint NULL,
|
"Instrumentor_Name" character varying(120) NULL,
|
||||||
"Diagnose" character varying(1024) NULL,
|
"Diagnose" character varying(1024) NULL,
|
||||||
"Procedures" character varying(10240) NULL,
|
"Nurse_Name" character varying(120) NULL,
|
||||||
"Nurse_Code" character varying(10) NULL,
|
"ProcedureValue" text NULL,
|
||||||
"Value" text NULL,
|
"ExecutionValue" text NULL,
|
||||||
|
"Type" character varying(10) NULL,
|
||||||
PRIMARY KEY ("Id"),
|
PRIMARY KEY ("Id"),
|
||||||
CONSTRAINT "fk_ActionReport_Encounter" FOREIGN KEY ("Encounter_Id") REFERENCES "public"."Encounter" ("Id") 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
|
||||||
);
|
);
|
||||||
|
|
||||||
|
-- PROPER
|
||||||
|
-- "Operator_Employe_Id" bigint NULL,
|
||||||
|
-- "Assistant_Employe_Id" bigint NULL,
|
||||||
|
-- "Instrumentor_Employe_Id" bigint NULL,
|
||||||
|
-- "Diagnose" character varying(1024) NULL,
|
||||||
|
-- "Procedures" character varying(10240) NULL,
|
||||||
|
-- "Nurse_Code" character varying(10) NULL,
|
||||||
|
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
-- Modify "ActionReport" table
|
-- Modify "ProcedureReport" table
|
||||||
ALTER TABLE "public"."ActionReport" DROP COLUMN "Date", DROP COLUMN "Procedures";
|
ALTER TABLE "public"."ProcedureReport" DROP COLUMN "Date", DROP COLUMN "Procedures";
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
-- Modify "ActionReport" table
|
-- Modify "ProcedureReport" table
|
||||||
ALTER TABLE "public"."ActionReport" ADD COLUMN "Date" timestamptz NOT NULL;
|
ALTER TABLE "public"."ProcedureReport" ADD COLUMN "Date" timestamptz NOT NULL;
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
-- Modify "ActionReport" table
|
-- Modify "ProcedureReport" table
|
||||||
ALTER TABLE "public"."ActionReport" ADD CONSTRAINT "fk_ActionReport_Instrumentor_Employe" FOREIGN KEY ("Instrumentor_Employe_Id") REFERENCES "public"."Employee" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION, ADD CONSTRAINT "fk_ActionReport_Nurse" FOREIGN KEY ("Nurse_Code") REFERENCES "public"."Nurse" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION, ADD CONSTRAINT "fk_ActionReport_Operator_Employe" FOREIGN KEY ("Operator_Employe_Id") REFERENCES "public"."Employee" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION;
|
ALTER TABLE "public"."ProcedureReport" ADD CONSTRAINT "fk_ProcedureReport_Instrumentor_Employe" FOREIGN KEY ("Instrumentor_Employe_Id") REFERENCES "public"."Employee" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION, ADD CONSTRAINT "fk_ProcedureReport_Nurse" FOREIGN KEY ("Nurse_Code") REFERENCES "public"."Nurse" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION, ADD CONSTRAINT "fk_ProcedureReport_Operator_Employe" FOREIGN KEY ("Operator_Employe_Id") REFERENCES "public"."Employee" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION;
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
-- Modify "ActionReport" table
|
-- Modify "ProcedureReport" table
|
||||||
ALTER TABLE "public"."ActionReport" ADD CONSTRAINT "fk_ActionReport_Doctor" FOREIGN KEY ("Doctor_Code") REFERENCES "public"."Doctor" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION;
|
ALTER TABLE "public"."ProcedureReport" ADD CONSTRAINT "fk_ProcedureReport_Doctor" FOREIGN KEY ("Doctor_Code") REFERENCES "public"."Doctor" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION;
|
||||||
Reference in New Issue
Block a user