Skip to content

Use Neo4j 5+ syntax for uniqueness constraints - #563

Open
rogermyung wants to merge 1 commit into
biolink:masterfrom
rogermyung:fix/neo4j5-constraint-syntax-upstream
Open

rogermyung wants to merge 1 commit into
biolink:masterfrom
rogermyung:fix/neo4j5-constraint-syntax-upstream

Conversation

@rogermyung

Copy link
Copy Markdown
Contributor

The ON ... ASSERT form of CREATE CONSTRAINT was removed in Neo4j 5, so every constraint statement failed against modern servers. The failure is swallowed by create_constraints, which logs it and continues, leaving loads with no unique index on id and turning every node MERGE and edge MATCH into a full label scan.

Switch to the FOR ... REQUIRE form and update the unit test that asserted on the old string.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant