added foreign keys

This commit is contained in:
Nikolaos Laskaris 2017-11-17 00:13:39 +01:00
parent 6b72242c2e
commit 67d95de255
1 changed files with 6 additions and 0 deletions

View File

@ -537,6 +537,12 @@ ALTER TABLE "UserDMP" ADD CONSTRAINT fkey_userdmp_user FOREIGN KEY (usr) REFEREN
ALTER TABLE "UserDMP" ADD CONSTRAINT fkey_userdmp_dmp FOREIGN KEY (dmp) REFERENCES "DMP"("ID");
ALTER TABLE "DMP" ADD CONSTRAINT fk_dmp_creator FOREIGN KEY ("Creator") REFERENCES "UserInfo"(id);
ALTER TABLE "Dataset" ADD CONSTRAINT fk_dataset_creator FOREIGN KEY ("Creator") REFERENCES "UserInfo"(id);
ALTER TABLE "Project" ADD CONSTRAINT fk_project_creator FOREIGN KEY ("CreationUser") REFERENCES "UserInfo"(id);
ALTER TABLE "UserInfo" OWNER TO dmptool;
ALTER TABLE "UserAuth" OWNER TO dmptool;
ALTER TABLE "UserDMP" OWNER TO dmptool;