2020-05-04 14:47:30 +02:00
|
|
|
CREATE TABLE public."UserAssociation" (
|
|
|
|
id uuid NOT NULL,
|
|
|
|
"firstUser" uuid NOT NULL,
|
|
|
|
"secondUser" uuid NOT NULL
|
|
|
|
);
|
|
|
|
|
|
|
|
|
2020-05-12 12:10:23 +02:00
|
|
|
ALTER TABLE public."UserAssociation" OWNER TO :POSTGRES_USER;
|
2020-05-04 14:47:30 +02:00
|
|
|
|
|
|
|
ALTER TABLE ONLY public."UserAssociation"
|
|
|
|
ADD CONSTRAINT pk_user_association PRIMARY KEY (id);
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public."UserAssociation"
|
|
|
|
ADD CONSTRAINT fk_userinfo_user_association_1 FOREIGN KEY ("firstUser") REFERENCES public."UserInfo"(id);
|
|
|
|
|
|
|
|
ALTER TABLE ONLY public."UserAssociation"
|
|
|
|
ADD CONSTRAINT fk_userinfo_user_association_2 FOREIGN KEY ("secondUser") REFERENCES public."UserInfo"(id);
|
|
|
|
|
|
|
|
INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.00.002', '2020-05-04 13:42:00.000000+03', now(), 'Add User Association');
|
|
|
|
|
|
|
|
|