Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michael-simons/neo4j-migrations
Automated script runner aka "Migrations" for Neo4j. Inspired by Flyway.
https://github.com/michael-simons/neo4j-migrations
database database-migrations database-refactoring graph neo4j versioning
Last synced: 15 days ago
JSON representation
Automated script runner aka "Migrations" for Neo4j. Inspired by Flyway.
- Host: GitHub
- URL: https://github.com/michael-simons/neo4j-migrations
- Owner: michael-simons
- License: apache-2.0
- Created: 2020-01-08T21:33:52.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-28T11:08:17.000Z (16 days ago)
- Last Synced: 2024-10-28T12:45:47.103Z (16 days ago)
- Topics: database, database-migrations, database-refactoring, graph, neo4j, versioning
- Language: Java
- Homepage: https://michael-simons.github.io/neo4j-migrations/
- Size: 99.1 MB
- Stars: 115
- Watchers: 6
- Forks: 23
- Open Issues: 9
-
Metadata Files:
- Readme: README.adoc
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.adoc
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
= Neo4j-Migrations
Michael Simons
:doctype: article
:lang: en
:listing-caption: Listing
:source-highlighter: coderay
:icons: font
// tag::properties[]
:fullVersion: 2.13.3
:groupId: eu.michael-simons.neo4j
:artifactIdMavenPlugin: neo4j-migrations-maven-plugin
:artifactIdSpringBoot: neo4j-migrations-spring-boot-starter
:artifactIdQuarkus: neo4j-migrations-quarkus
:artifactIdCore: neo4j-migrations
:artifactIdFormatAdoc: neo4j-migrations-formats-adoc
:artifactIdFormatMarkdown: neo4j-migrations-formats-markdown
:branch: main
:url-apidocs: https://michael-simons.github.io/neo4j-migrations/main/site
:url-projectinfo: https://michael-simons.github.io/neo4j-migrations/main/site
:url-gh-releases: https://github.com/michael-simons/neo4j-migrations/releases
// end::properties[][abstract]
--
Neo4j-Migrations is a database migration and refactoring tool that allows running Cypher scripts and programmatic refactorings
in a controlled and repeatable fashion against one or more Neo4j database.Neo4j-Migrations is a proud member of the https://neo4j.com/labs/[Neo4j-Labs] and maintained by authors of the Neo4j-Drivers- and SDN/OGM team.
--image:https://github.com/michael-simons/neo4j-migrations/workflows/build/badge.svg[link=https://github.com/michael-simons/neo4j-migrations/actions]
image:https://sonarcloud.io/api/project_badges/measure?project=eu.michael-simons.neo4j%3Aneo4j-migrations-parent&metric=coverage[link=https://sonarcloud.io/summary/new_code?id=eu.michael-simons.neo4j%3Aneo4j-migrations-parent]
image:https://sonarcloud.io/api/project_badges/measure?project=eu.michael-simons.neo4j%3Aneo4j-migrations-parent&metric=alert_status[link=https://sonarcloud.io/dashboard?id=eu.michael-simons.neo4j%3Aneo4j-migrations-parent]
image:https://maven-badges.herokuapp.com/maven-central/eu.michael-simons.neo4j/neo4j-migrations/badge.svg[link=https://maven-badges.herokuapp.com/maven-central/eu.michael-simons.neo4j/neo4j-migrations]== Introduction
// tag::introduction[]
Neo4j-Migrations are a set of tools to make your schema migrations as easy as possible.
They provide a uniform way for applications, the command line and build tools alike to track, manage and apply changes to your database, in short: to refactor your database.
The project is inspired to a large extent by https://flywaydb.org[FlywayDB], which is an awesome tool for migration of relational databases.
Most things evolve around Cypher scripts, however the Core API of Neo4j-Migrations allows defining Java classes as migrations as well.Neo4j-Migrations builds directly on top of the official https://github.com/neo4j/neo4j-java-driver[Neo4j Java driver], supports Neo4j 3.5, Neo4j 4.1 to 4.4 and Neo4j 5, including enterprise features such as multidatabase support and impersonation.
The only dependencies are said driver and https://github.com/classgraph/classgraph[ClassGraph], the latter being used to find migrations on the classpath.
The history of migrations applied is stored as a subgraph in your database.
// end::introduction[]The graph will look like this:
image::docs/modules/ROOT/images/chain-of-migrations.png[]
== Downloads
Binary downloads for the CLI are available on our https://github.com/michael-simons/neo4j-migrations/releases[release page]
for each version. Maven artifacts are available on https://search.maven.org/artifact/eu.michael-simons.neo4j/neo4j-migrations[central] under
the following coordinates:* Core API: `{groupId}:{artifactIdCore}:{fullVersion}`
* Spring-Boot-Starter: `{groupId}:{artifactIdSpringBoot}:{fullVersion}`
* Quarkus extension: `{groupId}:{artifactIdQuarkus}:{fullVersion}`
* Maven-Plugin: `{groupId}:{artifactIdMavenPlugin}:{fullVersion}`The quickest way to use the CLI is https://www.jbang.dev[JBang]. With JBang installed, just enter `jbang neo4j-migrations@neo4j --help` to get started.
Other options include Homebrew and Zip bundles. Please checkout the full list of https://michael-simons.github.io/neo4j-migrations/current/#download[download options].== Compatibility
Neo4j-Migrations can be used against Neo4j 3.5, all Neo4j 4 versions from 4.1 up to 4.4 and Neo4j 5, including all current Neo4j-Aura versions.
NOTE: Neo4j 4.0 is only partially supported since version 2.0 due to the fact that Neo4j Java Driver does not support it fully anymore since 5.x. If you need to use this library with Neo4j 4.0 (which you shouldn't, because 4.0 is out of support anyway), look at the latest 1.x version of Neo4j-Migrations. *This does not affect new versions of the 4.x series, such as Neo4j 4.4, which is fully supported by this project!*
// tag::compatibility[]
The Core API and the JVM based version of the CLI module of Neo4j-Migrations requires at least Java 17 or higher since version 2.0.
Neo4j-Migrations can safely be used on both the class- and module-path.
Native binaries are provided for 64bit versions of macOS, Linux and Windows. The native binaries don't require a JVM to be installed.For a version compatible with JDK 8, check the 1.x releases. We still do maintain the latest minor, including support for older versions of Spring Boot (prio to Spring Boot 3). These are also the versions you should be using against Neo4j 4.0.
The older releases of Neo4j-Migrations are compiled with JDK 17 while targeting JDK 8.
The Core API is provided as a Multi-Release-Jar in the older releases, providing a `module-info.java` for JDK 11 and higher, making it a good citizen on the Java module path as well.
// end::compatibility[]While the CLI module actually does not require a JVM installed (it is a native binary, available for a Linux, macOS and Windows alike), some people might prefer a solution native to their ecosystem. The following projects serve the same purpose as Neo4j-Migrations and use the same graph, check-summing and versioning scheme as this project:
* https://github.com/marianozunino/morpheus[Morpheus], written in TypeScript and published as NPM package, by https://github.com/marianozunino[@marianozunino]
If you want to be listed here too, please reach out, and we can collaborate to ensure compatibility.
== Manual
The complete manual is available here: https://michael-simons.github.io/neo4j-migrations[michael-simons.github.io/neo4j-migrations].
The API documentation for the core module is available here: https://michael-simons.github.io/neo4j-migrations/main/site/neo4j-migrations/apidocs/index.html[Neo4j Migrations (Core) {fullVersion} API]. The comprehensive set of system diagrams including https://sourcespy.com/github/michaelsimonsneo4jmigrations/[build, module and class diagrams] is automatically generated weekly.== Presentations and features
We try to promote this project as good as we can internally and externally while trying not to be too obtrusive. If you think it's a good idea to talk about it at your conference, just ask. Happy to answer CfPs. We are grateful about the coverage, presentations and features so far:
* https://www.infoq.com/news/2021/12/neo4j-migrations/[InfoQ: Migrating Neo4j Graph Schemas with Neo4j Migrations (2021-12-28)] by https://www.infoq.com/profile/Johan-Janssen/[Johan Janssen]
* https://jreleaser.org/guide/latest/index.html#_who_is_using_it[JReleaser: Who is using it] by https://twitter.com/aalmiray[Andres Almiray]
* https://speakerdeck.com/michaelsimons/neo4j-migrations-the-lean-way-of-applying-database-refactorings-to-neo4j-efa52ac1-85e1-4688-97f3-566fc78de6cd[Nodes 22: Neo4j-Migrations - The lean way of refactoring Neo4j content] by https://twitter.com/rotnroll666[Michael Simons] (https://github.com/michael-simons/nodes2022[Demo repository] and the https://www.youtube.com/watch?v=5-j0xiVAeoM[recording of the presentation])
* The first major upgrade, Neo4j-Migrations 2.0.0 was included in the https://github.blog/2023-02-08-release-radar-dec-2022-jan-2023/[GitHub Release Radar, Festive Edition ยท December 2022 โ January 2023]== CLI in a nutshell
image::docs/modules/ROOT/images/cli-demo.gif[]
== Contributors
++++
Adam Cowley
๐
Ali Ince
๐ ๐
Amit Kumar Yadav
๐ ๐ค
Andres Almiray
๐ป ๐ ๐ค ๐งโ๐ซ
Corneil du Plessis
๐
David Giliotti
๐ค
Florent Biville
๐ค
Frederik Hahne
๐ค
Gerrit Meier
๐ป ๐
Guillaume Grossetie
๐ป ๐
Hosch250
๐ ๐
Israel Bethencourt
๐ค
Kasper
๐ค
Kateryna Dovhalets
๐ป
Mariano Zunino
๐ค
Matt Souza
๐ค ๐ป
Maurizio Casciano
๐ค ๐
Michael Simons
๐ป ๐ ๐ง ๐ข
Peter Vavra
๐
Raf23
๐
Roberto Cortez
๐งโ๐ซ
Robsdedude
๐ฌ ๐
SALES
๐ค
Sascha Peukert
๐
Sean Killeen
๐
Sergei Egorov
๐
Sergey
๐ค
alexanoid
๐
dana canzano
๐ ๐
injectives
๐ป ๐
shanon84
๐ป ๐
szabopeter
๐
ttemple06
๐ค
++++