add postalcode

This commit is contained in:
dpurbosakti
2025-10-09 11:29:49 +07:00
parent 8b9fabd5e1
commit 63d2f2342c
7 changed files with 128 additions and 42 deletions
@@ -0,0 +1,9 @@
-- Create "PostalCode" table
CREATE TABLE "public"."PostalCode" (
"Id" bigserial NOT NULL,
"Code" character varying(5) NULL,
"Village_Code" character varying(10) NULL,
PRIMARY KEY ("Id"),
CONSTRAINT "uni_PostalCode_Code" UNIQUE ("Code"),
CONSTRAINT "fk_Village_PostalCodes" FOREIGN KEY ("Village_Code") REFERENCES "public"."Village" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION
);