Files
simrsx-be/cmd/migration/migrations/20250902105300.sql
T
2025-09-02 17:53:28 +07:00

14 lines
492 B
SQL

-- Create "Patient" table
CREATE TABLE "public"."Patient" (
"Id" bigserial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Person_Id" bigint NULL,
"RegisteredAt" timestamptz NULL,
"Status_Code" character varying(10) NOT NULL,
"Number" character varying(15) NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "fk_Patient_Person" FOREIGN KEY ("Person_Id") REFERENCES "public"."Person" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
);