Skip to content
This repository has been archived by the owner on Mar 22, 2019. It is now read-only.

Commit

Permalink
Add a unique contraint for all node IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
Tirokk committed Mar 14, 2019
1 parent 158ac36 commit 33df8d1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions neo4j/migrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ CREATE CONSTRAINT ON (p:Post) ASSERT p.slug IS UNIQUE;
CREATE CONSTRAINT ON (c:Category) ASSERT c.slug IS UNIQUE;
CREATE CONSTRAINT ON (u:User) ASSERT u.slug IS UNIQUE;
CREATE CONSTRAINT ON (o:Organization) ASSERT o.slug IS UNIQUE;
CREATE CONSTRAINT ON (n) ASSERT n.id IS UNIQUE;
' | cypher-shell

2 comments on commit 33df8d1

@appinteractive
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that’s not needed as our framework does that for every ID type. But we can keep it I think.

@roschaefer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which framework @appinteractive and where?

Please sign in to comment.