Closed hojabbr closed 4 years ago
Do you have the migration
node? How does it look like? Also, how is your folder structure looking?
This is my folder structure:
And this is my composer.json:
And I believe these are my nodes:
You might want to delete the users_table migration from the folder. Also remove that node from the DB and there should be no problem.
Same problem here, the problem is in the call of the default rollback
Vinelab\NeoEloquent\Console\Migrations\MigrateRollbackCommand $this->migrator->rollback($pretend);
The rollback of elequent has this parameters public function rollback($paths = [], array $options = []);
Same problem here, the migration is done successfully and you can see the NeoEloquentMigration nodes in the Neo4j database, however, when you try to roll back, you get the "undefined index" error.
I did a test by hardcoding the path in $this->migrator->rollback(['database/labels']); in src/Vinelab/NeoEloquent/Console/Migrations/MigrateRollbackCommand.php:56 and the rollback ran successfully
Same issue here. I can confirm @javiertoledos's fix works though in the meantime
I am facing similar issue when calling rollback. Migrate works fine, but rollback throws below trace
./artisan neo4j:migrate:rollback
Vinelab\NeoEloquent\QueryException : ParameterNotFoundException: Expected parameter(s): migration, migration
at /path-to-project/vendor/vinelab/neoeloquent/src/Connection.php: 467
Exception trace:
1 Vinelab\NeoEloquent\Connection::run("MATCH (neoEloquentMigration:`NeoEloquentMigration`) WHERE neoEloquentMigration.migration = {migration} OPTIONAL MATCH (neoEloquentMigration:`NeoEloquentMigration`)-[r]-() WHERE neoEloquentMigration.migration = {migration} DELETE neoEloquentMigration,r", Object(Closure))
/path-to-project/vendor/vinelab/neoeloquent/src/Connection.php : 222
2 Vinelab\NeoEloquent\Connection::affectingStatement("MATCH (neoEloquentMigration:`NeoEloquentMigration`) WHERE neoEloquentMigration.migration = {migration} OPTIONAL MATCH (neoEloquentMigration:`NeoEloquentMigration`)-[r]-() WHERE neoEloquentMigration.migration = {migration} DELETE neoEloquentMigration,r")
/path-to-project/vendor/laravel/framework/src/Illuminate/Database/Connection.php : 435
I have tried @javiertoledos fix , but I am yet to get it working.
(Laravel 5.6, NeoEloquent 1.4.6)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
php artisan neo4j:migrate:rollback
Produces:
Undefined index: 2016_10_22_160149_create_users_table
My Migration file looks like this:
But
php artisan neo4j:migrate
works correctly.(Laravel 5.3, NeoEloquent 1.4.2)