neo4j-migrations icon indicating copy to clipboard operation
neo4j-migrations copied to clipboard

Provide an option to specify a file to perform the neo4j-migrations (--location)

Open SergeyPlatonov opened this issue 3 years ago • 2 comments
trafficstars

Neo4j-Migrations versions (tried 3 versions): 1.6.0, 1.8.0, 1.8.3. Used Neo4j-Migrations tool via CLI (Neo4j-Migrations-CLI).

The command that was used: neo4j-migrations --username {user_name} --password {password} --address bolt://{IP}:7687 --database entitlements --location file:./scripts migrate

In location, I can only specify a folder, but I want to specify a filename within a folder. For example: neo4j-migrations --username {user_name} --password {password} --address bolt://{IP}:7687 --database entitlements --location file:./scripts/V1_1_1__v1_constraints.cypher migrate

I see the message: No migrations have been applied.

SergeyPlatonov avatar Jul 21 '22 16:07 SergeyPlatonov

And what should happen when you want to add a 2nd file? Shall the tool create a migration graph? Or append to the existing one?

It would require the whole validation to be rewritten. If you just want to run scripts, Neo4j Cypher-Shell is a better option. The scripts will be compatible.

michael-simons avatar Jul 26 '22 17:07 michael-simons

Hi @michael-simons

I would expect to add a node to an existing one. I understand that this is not a common use case, but for our particular case, it would be nice if we had the option.

SergeyPlatonov avatar Aug 05 '22 13:08 SergeyPlatonov

I'm gonna pick this up later this week, will most likely not add anything to the chain, but just run a cypher or catalog based migration and be done with it. This way refactorings can be used easily standalone.

michael-simons avatar Sep 27 '22 08:09 michael-simons

@all-contributors please add @SergeyPlatonov for ideas

michael-simons avatar Sep 27 '22 19:09 michael-simons

@michael-simons

I've put up a pull request to add @SergeyPlatonov! :tada:

allcontributors[bot] avatar Sep 27 '22 19:09 allcontributors[bot]