An open API service indexing awesome lists of open source software.

https://github.com/michael-simons/neo4j-flyway-database

A plugin for Flyway that enables Neo4j usage.
https://github.com/michael-simons/neo4j-flyway-database

flyway flyway-migrations graph graphdatabase neo4j

Last synced: 11 months ago
JSON representation

A plugin for Flyway that enables Neo4j usage.

Awesome Lists containing this project

README

          

= Neo4j-Flyway-Database
Michael Simons
:doctype: article
:lang: en
:listing-caption: Listing
:source-highlighter: coderay
:icons: font

== Introduction

This is a plugin for https://documentation.red-gate.com/fd/[Redgate Flyway Database] migrations.
It requires the https://github.com/neo4j/neo4j-jdbc[Neo4j JDBC Driver] 6.2 or higher.
It does not ship the driver itself and requires at least 6.2 or higher.
This plugin does *not* work with the common Neo4j driver for Java.
If you need something on that driver, have a look at https://github.com/michael-simons/neo4j-migrations[Neo4j-Migrations], it creates the same database structure and both tools should be able to read each other's data.

Support is delivered on best effort basis, this plugin is neither an official Neo4j nor Redgate product.

== Which driver-bundle to use?

We recommend the https://neo4j.com/docs/jdbc-manual/current/distribution/#_full_bundle[full-bundle].
The Maven coordinates are: `org.neo4j:neo4j-jdbc-full-bundle`.

== SQL or Cypher?

The Neo4j JDBC Driver can run Cypher and SQL.
It defaults to Cypher by default, and we recommend writing your migrations in Cypher.
Cypher files with `.sql` extensions look odd, so you should configure Flyway to recognize `.cypher`, too.

However, if you enabled SQL to Cypher translation, you can also use SQL in your migrations.
Learn more about this in the drivers https://neo4j.com/docs/jdbc-manual/current/sql2cypher/[manual].
The URL parameter to turn on SQL to Cypher translation is `?enableSQLTranslation=true`.