diff --git a/dmp-db-scema/DataManagementPlanDB.sql b/dmp-db-scema/DataManagementPlanDB.sql index 8d8e41ffc..8ab9dcaf7 100644 --- a/dmp-db-scema/DataManagementPlanDB.sql +++ b/dmp-db-scema/DataManagementPlanDB.sql @@ -129,6 +129,9 @@ CREATE TABLE "DatasetProfile" ( "Definition" xml NOT NULL ); +-- SHould also force the 1-1 relation between the datasetprofile <-> ruleset and datasetprofile <-> viewstyle +ALTER TABLE "DatasetProfile" ADD CONSTRAINT datasetprofile_unique_ruleset UNIQUE ("Ruleset"); +ALTER TABLE "DatasetProfile" ADD CONSTRAINT datasetprofile_unique_viewstyle UNIQUE ("Viewstyle"); ALTER TABLE "DatasetProfile" OWNER TO dmptool;