I have this kind sample project HERE
In that sample data, I try to use Flyway to implement database migration with neo4j database. I can create and insert normal SQL with H2 database (I used H2 database in my sample project), but I dunno how to implement it with Neo4j graphdatabase.
I need to init data when application start. This is how I try to set my migration code :
public class V1_1__InitMaster implements SpringJdbcMigration {
public void migrate(JdbcTemplate jdbcTemplate) throws Exception {
/*
//Example using h2 database
jdbcTemplate.execute("CREATE TABLE Unit ("
+ "code VARCHAR(30),"
+ "name VARCHAR(30),"
+ "value DOUBLE"
+ ");");
jdbcTemplate.execute("INSERT INTO Unit ('ft','Feet',1);");
//How I can save my init data to neo4j database in here?
for(String[] unitString : initDataMaster.unitList){
//I got list unitList here
}
*/
}
}
I read this Page about flyway that can manage database migration with neo4j, and I looks some pages that explain about Flyway integration with Spring and Neo4j.
What I asked is, How to save my initialization Data and use Flyway to manage it and integrate it with Neo4j and Spring?