The old way of doing schemas in neo4j.rb involved adding an index property on the model. This is no longer valid and you have to utilize the migration feature added in 8.0.
You can browse the schema on the localhost:747/browser window in your browser by running the :schema command
To clear it out you run these commands in the rails console thanks to stackoverflow
conn = Faraday.new(url: "http://localhost:7474")
response = conn.get('/db/data/schema/constraint/')
constraints = JSON.parse(response.body)
constraints.each do |constraint|
Neo4j::ActiveBase.current_session.query("DROP CONSTRAINT ON (label:`#{constraint['label']}`) ASSERT label.#{constraint['property_keys'].first} IS UNIQUE")
end
response = conn.get('/db/data/schema/index/')
indexes = JSON.parse(response.body)
indexes.each do |index|
Neo4j::ActiveBase.current_session.query("DROP INDEX ON :`#{index['label']}`(#{index['property_keys'].first})")
endThe next thing needed is to create a migration. Check out the neo4jrb docs for more info