Files
simrsx-be/cmd/migration/migrations/20250820062943.sql
T
2025-08-20 13:40:25 +07:00

13 lines
457 B
SQL

-- Create "Unit" table
CREATE TABLE "public"."Unit" (
"Id" serial NOT NULL,
"CreatedAt" timestamptz NULL,
"UpdatedAt" timestamptz NULL,
"DeletedAt" timestamptz NULL,
"Installation_Id" integer NULL,
"Code" character varying(10) NULL,
"Name" character varying(50) NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "fk_Unit_Installation" FOREIGN KEY ("Installation_Id") REFERENCES "public"."Installation" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
);