-- Modify "DeviceOrder" table
ALTER TABLE "public"."DeviceOrder" ADD COLUMN "Status_Code" text NULL;
-- Modify "DeviceOrderItem" table
ALTER TABLE "public"."DeviceOrderItem" ADD COLUMN "Count" smallint NULL;
-- Modify "MaterialOrder" table
ALTER TABLE "public"."MaterialOrder" ADD COLUMN "Status_Code" text NULL;
-- Modify "Medication" table
ALTER TABLE "public"."Medication" ADD COLUMN "Status_Code" text NULL;
-- Modify "MedicationItem" table
ALTER TABLE "public"."MedicationItem" ALTER COLUMN "Usage" TYPE numeric, ADD COLUMN "IsRedeemed" boolean NULL;
-- Modify "PrescriptionItem" table
ALTER TABLE "public"."PrescriptionItem" ALTER COLUMN "Usage" TYPE numeric;
-- Modify "MedicationItemDist" table
ALTER TABLE "public"."MedicationItemDist" ALTER COLUMN "Remain" TYPE numeric, ADD COLUMN "Nurse_Id" bigint NULL, ADD CONSTRAINT "fk_MedicationItemDist_Nurse" FOREIGN KEY ("Nurse_Id") REFERENCES "public"."Nurse" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION;
