add table person-relative, add fk personrelative into person
This commit is contained in:
No files matched your search
@@ -0,0 +1,20 @@
|
||||
-- Create "PersonRelative" table
|
||||
CREATE TABLE "public"."PersonRelative" (
|
||||
"Id" bigserial NOT NULL,
|
||||
"CreatedAt" timestamptz NULL,
|
||||
"UpdatedAt" timestamptz NULL,
|
||||
"DeletedAt" timestamptz NULL,
|
||||
"Person_Id" bigint NULL,
|
||||
"Relationship_Code" character varying(100) NOT NULL,
|
||||
"Name" character varying(100) NULL,
|
||||
"Address" character varying(100) NULL,
|
||||
"Village_Code" character varying(10) NULL,
|
||||
"Gender_Code" character varying(10) NULL,
|
||||
"PhoneNumber" character varying(30) NULL,
|
||||
"Education_Code" character varying(10) NULL,
|
||||
"Occupation_Code" character varying(10) NULL,
|
||||
"Occupation_Name" character varying(50) NULL,
|
||||
PRIMARY KEY ("Id"),
|
||||
CONSTRAINT "fk_PersonRelative_Village" FOREIGN KEY ("Village_Code") REFERENCES "public"."Village" ("Code") ON UPDATE NO ACTION ON DELETE NO ACTION,
|
||||
CONSTRAINT "fk_Person_Relatives" FOREIGN KEY ("Person_Id") REFERENCES "public"."Person" ("Id") ON UPDATE NO ACTION ON DELETE NO ACTION
|
||||
);
|
||||
Reference in New Issue
Block a user