diff --git a/dmp-db-scema/DataManagementPlanDB.sql b/dmp-db-scema/DataManagementPlanDB.sql index 67cd5b12a..b7f0f5a14 100644 --- a/dmp-db-scema/DataManagementPlanDB.sql +++ b/dmp-db-scema/DataManagementPlanDB.sql @@ -450,9 +450,6 @@ ALTER TABLE ONLY "DatasetService" ADD CONSTRAINT "DatasetServiceServiceReference" FOREIGN KEY ("Service") REFERENCES "Service"("ID"); -DROP table if exists "UserDMP"; -DROP table if exists "UserInfo"; -DROP table if exists "UserAuth"; CREATE TABLE "UserInfo" ( "id" uuid DEFAULT uuid_generate_v4() UNIQUE NOT NULL, @@ -493,8 +490,8 @@ create table "UserDMP" ( "role" integer ); -ALTER TABLE "UserDMP" ADD CONSTRAINT fkey_userdmp_user FOREIGN KEY ("user") REFERENCES "UserInfo"("id"); -ALTER TABLE "UserDMP" ADD CONSTRAINT fkey_userdmp_dmp FOREIGN KEY ("dmp") REFERENCES "DMP"("ID"); +ALTER TABLE "UserDMP" ADD CONSTRAINT fkey_userdmp_user FOREIGN KEY (usr) REFERENCES "UserInfo"("id"); +ALTER TABLE "UserDMP" ADD CONSTRAINT fkey_userdmp_dmp FOREIGN KEY (dmp) REFERENCES "DMP"("ID"); ALTER TABLE "UserInfo" OWNER TO dmptool;