From: Richard Millet Date: Fri, 31 Aug 2018 21:16:14 +0000 (-0700) Subject: DRYD-473: Changing constraint to the 'relationshiptype' field instead of the deprecat... X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=e65179fd5a2bf3e71a55c46ca981a7792e3d57a3;p=tmp%2Fjakarta-migration.git DRYD-473: Changing constraint to the 'relationshiptype' field instead of the deprecated 'predicate' field. --- diff --git a/3rdparty/nuxeo/nuxeo-server/7.10-HF17/config/vcsconfig.sql.txt b/3rdparty/nuxeo/nuxeo-server/7.10-HF17/config/vcsconfig.sql.txt index bbc090f90..4144c65db 100644 --- a/3rdparty/nuxeo/nuxeo-server/7.10-HF17/config/vcsconfig.sql.txt +++ b/3rdparty/nuxeo/nuxeo-server/7.10-HF17/config/vcsconfig.sql.txt @@ -37,4 +37,4 @@ LOG.INFO Adding constraint to the relations table to prevent duplicate relations SELECT constraint_name FROM information_schema.constraint_column_usage WHERE table_name = 'relations_common' AND constraint_name = 'relations_unique'; #IF: emptyResult -ALTER TABLE relations_common add CONSTRAINT relations_unique UNIQUE (subjectcsid, subjectrefname, predicate, objectcsid, objectrefname); +ALTER TABLE relations_common add CONSTRAINT relations_unique UNIQUE (subjectcsid, subjectrefname, relationshiptype, objectcsid, objectrefname); diff --git a/services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationValidatorHandler.java b/services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationValidatorHandler.java index d00793877..9ae8ea227 100644 --- a/services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationValidatorHandler.java +++ b/services/relation/service/src/main/java/org/collectionspace/services/relation/nuxeo/RelationValidatorHandler.java @@ -29,39 +29,39 @@ public class RelationValidatorHandler extends ValidatorHandlerImpl