'Neo4j Deployments / Versioning

We have Neo4j environments set up on developers' machines, QA and Production. When doing development, we make schema changes, add nodes, add relationships, rename things, etc. - typical development (graph or no graph, a database is a database).

Once the development reaches a certain point, these changes (application code and database code) needs to be pushed to QA -> PROD.

With traditional database (e.g. SQL Server), one could have a table that contains a version, a SQL script that would query that table/version #, and have a branching logic, which, depending on the version, would execute the right statements, to bring target database to the right schema level.

How do people do the same in Neo4j? Is there a good solution? Seems that apoc/branching logic in Cypher are rather limited and cumbersome.



Solution 1:[1]

neo4j has documentation on upgrades, and also a web page on upgrades.

Generally, a newly-installed neo4j version will support automatic upgrading of the files backing an existing DB (for specific older versions), as long as the dbms.allow_upgrade config setting is true.

Also, older versions of the Cypher language can still be used. The Cypher version can be specified per-query, or neo4j can be configured to use that version for all queries.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 cybersam