• Stars
    star
    114
  • Rank 308,031 (Top 7 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created almost 5 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Automated script runner aka "Migrations" for Neo4j. Inspired by Flyway.

Neo4j-Migrations

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 Neo4j-Labs and maintained by authors of the Neo4j-Drivers- and SDN/OGM team.

badge measure?project=eu.michael simons measure?project=eu.michael simons badge

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 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 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 ClassGraph, the latter being used to find migrations on the classpath.

The history of migrations applied is stored as a subgraph in your database.

The graph will look like this:

chain of migrations

Downloads

Binary downloads for the CLI are available on our release page for each version. Maven artifacts are available on central under the following coordinates:

  • Core API: eu.michael-simons.neo4j:neo4j-migrations:2.8.0

  • Spring-Boot-Starter: eu.michael-simons.neo4j:neo4j-migrations-spring-boot-starter:2.8.0

  • Quarkus extension: eu.michael-simons.neo4j:neo4j-migrations-quarkus:2.8.0

  • Maven-Plugin: eu.michael-simons.neo4j:neo4j-migrations-maven-plugin:2.8.0

The quickest way to use the CLI is 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 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!

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.

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:

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: michael-simons.github.io/neo4j-migrations. The API documentation for the core module is available here: Neo4j Migrations (Core) 2.8.0 API. The comprehensive set of system diagrams including 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:

CLI in a nutshell

cli demo

More Repositories

1

biking2

This is the source code of http://biking.michael-simons.eu
Java
177
star
2

wro4j-spring-boot-starter

A Spring Boot starter and auto-configuration for wro4j (http://alexo.github.io/wro4j/)
Java
68
star
3

goodreads

A collection of articles, books and quotes that may help to become a better developer
Java
61
star
4

java-oembed

Simple oembed implementation for Java based on Apache HttpClient
Java
47
star
5

tweetarchive

Hibernate Search and Spring Boot: Simple yet powerful archiving
Java
39
star
6

neo4j-examples-and-tips

A somewhat curated list of Neo4j examples and tips, mostly around SDN with OGM (SDN 5.x), SDN 6 (previously SDN/RX) and testing.
38
star
7

bikingFX

Java
33
star
8

keycloakdemo

Simple demo that uses Spring Boot 2 / Security 5 to connect to Keycloak
Java
28
star
9

blockchain-playground

Some naive blockchain implementations used for demonstrating Webflux and Micrometer
Kotlin
26
star
10

bootiful-music

Java
24
star
11

bootiful-databases

JavaScript
23
star
12

springio2016

Slides and demo code for my talk at Spring I/O 2016
HTML
18
star
13

neo4j-from-the-jvm-ecosystem

Examples of how to connect to Neo4j on the JVM, reading and writing data.
Java
18
star
14

simple-meetup

Java
16
star
15

garmin-babel

Tooling for the archive created by Garmin datamanagement.
Java
15
star
16

neo4j-java-driver-native-lib

Example that uses GraalVM native image to create a shared library, callable from C, Ruby or other ecosystems that support foreign function interfaces.
Java
11
star
17

neo4j-aura-quarkus-graphql

Built a GraphQL-API based on the Cypher-DSL and Quarkus.
Java
10
star
18

neo4j-reactive-java-client

Java
10
star
19

neo4j-graalvm-polyglot-examples

Examples how to use the Neo4j Java Driver inside the GraalVM versions of R, Ruby, Python and JavaScript.
R
9
star
20

junit-jupiter-causal-cluster-testcontainer-extension

Java
9
star
21

dfx-mosaic

A java based mosaic generator, mostly useful for dailyfratze.de
Java
8
star
22

aoc

Solutions to Advent of Code in various languages.
Java
8
star
23

DOAG2016

Slides and demo code for my talk at DOAG2016
JavaScript
8
star
24

biking3

Database schema and Flask application for tracking mileages on bikes
HTML
7
star
25

homebrew-seabolt

Ruby
7
star
26

datamongotest-autoconfigure-spring-boot-DEPRECATED-

Provides a `@DataMongoTest` for the automatic configuration of tests with Spring Boot 1.4+.
Java
6
star
27

enerko-reports2

ENERKOs Report Engine
Java
5
star
28

pv

Some scripts to work with PV measurements and tooling to record measurements.
Jupyter Notebook
5
star
29

java-akismet

A java client for akismet.com
Java
5
star
30

configurable-single-user-spring-boot-starter

A super simple Spring Boot Starter for Spring Boot 2.0 that brings back the configurable, single user.
Java
5
star
31

simons.ac

Sources of http://simons.ac
JavaScript
4
star
32

neo4j-polyglot-stored-procedures

Java
4
star
33

scrobbles4j

Java
4
star
34

modulartesting

Java
4
star
35

java-syndication

Modules and utilities to use in ROME
Java
4
star
36

java-trustprovideragent

Java
4
star
37

NetBeansEveningCologne

Slides and demo code for my talk at NetBeans Evening Cologne September 2016
Java
4
star
38

neo4j-examples-record-movies

JDK 14 port of https://github.com/neo4j/sdn-rx/tree/master/examples/reactive-web.
Java
4
star
39

neo4j-graphql-spring-boot-sample

Java
3
star
40

die13gezeichneten

Kotlin
3
star
41

java-autolinker

An extendable autolinking library
Java
3
star
42

neo4j-spring-boot-integration-tests

Simple project to keep some integration tests of Neo4j-OGM, Spring Data and Spring Boot in place.
Java
3
star
43

neo4j-load-parquet

Java
2
star
44

passwordmigration

Demonstrating one way to migrate unsecured, old password hashes to Spring Security 5
Java
2
star
45

ws-20170627-cluj

Workshop at Accesa
HTML
2
star
46

girlswhoviking

Java
2
star
47

native-story

Java
2
star
48

assertjdemos

Shell
1
star
49

smi2txt

An obsolete tool to convert SMS messages in smi format to txt files
C
1
star
50

die13gezeichneten.py

Python
1
star
51

neo4j-jolt

PoC for a type safe JSON response from Neo4js HTTP endpoint.
Java
1
star
52

neo4j-aura-sdn-graphql

Java
1
star
53

nodes2022

Demo for Nodes2022
Java
1
star
54

homebrew-neo4j-migrations

Ruby
1
star
55

neo4j-examples-multidatabase-movies

Example code for https://medium.com/neo4j/reactive-multi-tenancy-with-neo4j-4-0-and-sdn-rx-d8ae0754c35
Java
1
star