Closed MatthewAger closed 1 year ago
Could you show me your attempted fix?
Hah! Was quite naïve...
def fetch_constraint_descriptions
ActiveGraph::Base.query(
ActiveGraph::Base.version?('<4.3') ?
'CALL db.constraints() YIELD description' :
'SHOW CONSTRAINTS YIELD createStatement'
).map(&:first)
end
in the hope that in both cases the query returned an array. But as I say, I get the same error as I do as standard on Neo4j 4.x.
This is what that query returns on my test server btw
╒══════════════════════════════════════════════════════════════════════╕
│"createStatement" │
╞══════════════════════════════════════════════════════════════════════╡
│"CREATE CONSTRAINT `constraint_306769aa` FOR (n:`Artwork`) REQUIRE (n.│
│`uuid`) IS UNIQUE OPTIONS {indexConfig: {}, indexProvider: 'range-1.0'│
│}" │
├──────────────────────────────────────────────────────────────────────┤
│"CREATE CONSTRAINT `constraint_8e2dcb08` FOR (n:`Portfolio`) REQUIRE (│
│n.`uuid`) IS UNIQUE OPTIONS {indexConfig: {}, indexProvider: 'range-1.│
│0'}" │
├──────────────────────────────────────────────────────────────────────┤
│"CREATE CONSTRAINT `constraint_dbcee0a4` FOR (n:`ActiveGraph::Migratio│
│ns::SchemaMigration`) REQUIRE (n.`migration_id`) IS UNIQUE OPTIONS {in│
│dexConfig: {}, indexProvider: 'range-1.0'}" │
└──────────────────────────────────────────────────────────────────────┘
Hi,
Running
bundle exec rake neo4j:schema:dump
(and hence any other rake task that invokes that task) fails withThis is clearly related to this recent change https://github.com/neo4jrb/activegraph/blob/7a5fc1d4087be83d3e8af8932bf56371e9fc8810/lib/active_graph/core/label.rb#L141-L143 in the v11.1.0 release and was perhaps just missed?
The culprit appears to be here https://github.com/neo4jrb/activegraph/blob/85abe96b29f5844b46c865c7a957cdf10087d80c/lib/active_graph/migrations/schema.rb#L22-L24
I attempted to fix that line in a similar way, but get
which, incidentally, is what you get if you run
neo4j:schema:dump
on a v4.x database.Runtime information:
Neo4j database version: 5.2 (and 4.4) activegraph (11.1.0) neo4j-rake_tasks (0.7.19) neo4j-ruby-driver (4.4.1) rails (7.0.4.1)