You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ended up finding #213 whilst looking into a problem with Rails migrations hanging:
== 20230131114605 ForceCreateNeo4jFairsharingRecordUuidConstraint: running... ==
CYPHER SHOW CONSTRAINTS YIELD * WHERE type = $type AND labelsOrTypes = $labels AND properties = $properties | {:type=>"UNIQUENESS", :labels=>[:"Neo4j::FairsharingRecord"], :properties=>[:uuid]}
CYPHER DROP CONSTRAINT constraint_93c26f8d
CYPHER CREATE CONSTRAINT FOR (n:`Neo4j::FairsharingRecord`) REQUIRE n.`uuid` IS UNIQUE
...and at this point, ^C is necessary.
In the logs I see the following:
2023-01-31 11:46:17.672+0000 ERROR [o.n.b.p.c.f.StateMachineSPIImpl] Client triggered an unexpected error [Neo.DatabaseError.Statement.ExecutionFailed]: T
rying to create constraint 'constraint_93c26f8d' in same transaction as dropping 'constraint_93c26f8d'. This is not supported because they are both backed
by similar indexes. Please drop constraint in a separate transaction before creating the new one., reference ac940772-c3c0-4d0e-a251-e8f84a41d454.
Dropping the constraint via a Neo4j console in the browser and re-running migrations eventually worked around the issue.
Yes, this behavior is enforced by neo4j server. The driver correctly passes the error through its api. In the migration, you should disable transactions so every query is executed in its own.
I ended up finding #213 whilst looking into a problem with Rails migrations hanging:
...and at this point, ^C is necessary.
In the logs I see the following:
Dropping the constraint via a Neo4j console in the browser and re-running migrations eventually worked around the issue.
Ruby: 3.1.2p20
Rails: 7.0.4.2
Neo4j version 5.4.0-1
Neo4j ruby driver version: 4.4.3
The text was updated successfully, but these errors were encountered: