diff --git a/src/Schema.js b/src/Schema.js index be0174c..0e5d614 100644 --- a/src/Schema.js +++ b/src/Schema.js @@ -1,7 +1,7 @@ function UniqueConstraintCypher(label, property, mode = 'CREATE') { - return `${mode} CONSTRAINT ON (model:${label}) ASSERT model.${property} IS UNIQUE`; + return `${mode} CONSTRAINT FOR (model:${label}) REQUIRE model.${property} IS UNIQUE`; } function ExistsConstraintCypher(label, property, mode = 'CREATE') {