Neo4j-Migrations is a set of tools to make your schema migrations as easy as possible. It provides a uniform way for applications, the command line and build tools alike to track, manage and apply changes to your database. It is inspired to a large extend by FlywayDB, so most things evolve around Cypher-Scripts. Neo4j-Migrations builds directly on top of the official Neo4j-Java-Driver, supports Neo4j from 3.5 up to 4.4, including enterprise features such as multidatabase support and impersonation.
All provided modules have feature parity: Commands in the API reflect in the CLI, in the Maven as well as in the Spring Boot integration
Features
Directly based on the official Neo4j-Java-Driver (Bolt), no JDBC required
Works well with dynamic environments such as Neo4j Aura by using transactional functions throughout the whole stack
Can use different database for storing migration information and for applying actual migrations (Separation of the database being managed and the database containing the management information)
Supports Impersonation
Core Java API with guaranteed semantic versioning to be used in any way you prefer
Provides a Spring Boot Starter that hooks into the official Spring Boot support for Neo4j so that only migrations scripts need to be provided
Provides a Maven-plugin for running migrations during build-time
Native CLI tools for Linux, macOS and Windows, no Java required to run migrations via the CLI
Native CLI for macOS can be installed via the homebrew package-manager
The Java API allows for very custom migrations written in Java, using the official driver for special cases in which Cypher might not be sufficient
Neo4j-Migrations comes in different flavors:
Core
The core module, providing an API to run both Cypher script and Java-based migrations. The API includes builders for configuration. The core is released as a Multi-Release-Jar, so that it behaves nicely on the module-path on JDK 17. Be aware that we sealed all interfaces not intended to be implemented by you when running on JDK 17.
A command line tool that supports every interaction that the core module provides. Native binaries are available for Linux, macOS and Windows. If you want to use Java-based migrations in the CLI, you must use the JVM distribution. This is an ideal tool to be put into CI/CD not based on Maven or Gradle.
Spring-Boot-Starter
Provides all configuration options via the well-known Spring-Boot-Properties mechanism and turns them into a fully configured Migrations instance that will be applied on application start. Scripts will be searched sane default location.
An extension for Quarkus, providing full integration of all configuration option via Quarkus' configuration. Creates a startup observer that applies all resolved migrations at startup.
from the docs
Neo4j-Migrations: Manage schema changes with ease
Neo4j-Migrations is a set of tools to make your schema migrations as easy as possible. It provides a uniform way for applications, the command line and build tools alike to track, manage and apply changes to your database. It is inspired to a large extend by FlywayDB, so most things evolve around Cypher-Scripts. Neo4j-Migrations builds directly on top of the official Neo4j-Java-Driver, supports Neo4j from 3.5 up to 4.4, including enterprise features such as multidatabase support and impersonation.
All provided modules have feature parity: Commands in the API reflect in the CLI, in the Maven as well as in the Spring Boot integration
Features
Neo4j-Migrations comes in different flavors:
Core
The core module, providing an API to run both Cypher script and Java-based migrations. The API includes builders for configuration. The core is released as a Multi-Release-Jar, so that it behaves nicely on the module-path on JDK 17. Be aware that we sealed all interfaces not intended to be implemented by you when running on JDK 17.
JavaDoc and Project info
CLI
A command line tool that supports every interaction that the core module provides. Native binaries are available for Linux, macOS and Windows. If you want to use Java-based migrations in the CLI, you must use the JVM distribution. This is an ideal tool to be put into CI/CD not based on Maven or Gradle.
Spring-Boot-Starter
Provides all configuration options via the well-known Spring-Boot-Properties mechanism and turns them into a fully configured Migrations instance that will be applied on application start. Scripts will be searched sane default location.
JavaDoc and Project info
Quarkus
An extension for Quarkus, providing full integration of all configuration option via Quarkus' configuration. Creates a startup observer that applies all resolved migrations at startup.
JavaDoc and Project info
Maven-Plugin
A Maven-plugin that hooks clean, apply and verify operations into the appropriate Maven lifecycles. Use this to apply migrations during your build.
Plugin info