From 53c0374aa8239e9350cc950120975fa9063c2149 Mon Sep 17 00:00:00 2001 From: coltrane Date: Wed, 24 Apr 2024 10:37:12 -0400 Subject: [PATCH] update constraint syntax --- src/Schema.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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') {