If I get it correctly, this only enforces an existence constraint, not a uniqueness:
CREATE CONSTRAINT ON (c:City)
ASSERT exists (c.name);
To make it unique, I would use a unique property constraint using the following syntax:
CREATE CONSTRAINT ON (c:City)
ASSERT c.name IS UNIQUE
Can I somehow make it unique and enforce existence at the same time?
If I run:
CREATE CONSTRAINT ON (c:City)
ASSERT exists (c.name) IS UNIQUE;
I get an error:
Query failed: line 2:24 mismatched input 'IS' expecting {<EOF>, ';'}