adjust and add tables for mcu orders

This commit is contained in:
dpurbosakti
2025-09-18 14:38:18 +07:00
parent ab9cda65af
commit 3b601c4d76
15 changed files with 299 additions and 26 deletions

No files matched your search

@@ -0,0 +1,10 @@
-- Modify "McuOrder" table
ALTER TABLE "public"."McuOrder" ADD COLUMN "SpecimenPickTime" timestamptz NULL, ADD COLUMN "ExaminationDate" timestamptz NULL, ADD COLUMN "Number" smallint NULL, ADD COLUMN "Temperature" numeric NULL, ADD COLUMN "McuUrgencyLevel_Code" character varying(10) NOT NULL;
-- Modify "McuOrderItem" table
ALTER TABLE "public"."McuOrderItem" ADD COLUMN "ExaminationDate" timestamptz NULL;
-- Create index "idx_order_src" to table: "McuOrderItem"
CREATE UNIQUE INDEX "idx_order_src" ON "public"."McuOrderItem" ("McuOrder_Id", "McuSrc_Id");
-- Modify "PersonRelative" table
ALTER TABLE "public"."PersonRelative" ADD COLUMN "Responsible" boolean NULL;
-- Modify "McuSrc" table
ALTER TABLE "public"."McuSrc" ALTER COLUMN "Id" TYPE bigint, ADD COLUMN "Item_Id" bigint NULL, ADD CONSTRAINT "fk_McuSrc_Item" FOREIGN KEY ("Item_Id") REFERENCES "public"."Item" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION;