Files
simrsx-be/cmd/main-migration/migrations/20251202063820.sql
2025-12-02 13:42:02 +07:00

18 lines
646 B
SQL

-- Create "VaccineData" table
CREATE TABLE "public"."VaccineData" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Vaccine_type_Code" text NULL,
"Encounter_Id" bigint NULL,
"Vaccine_batch_number" bigint NULL,
"Vaccine_dose" bigint NULL,
"Dose_order" bigint NULL,
"Injection_location" text NULL,
"Vaccination_datetime" timestamptz NULL,
"Vaccine_expiration_date" timestamptz NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "fk_VaccineData_Encounter" FOREIGN KEY ("Encounter_Id") REFERENCES "public"."Encounter" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
);