Closed kolorafa closed 10 months ago
+1 Same here, when using with robmorgan/phinx
What I did: removed composer.lock
and did a fresh new composer install
which in return resulted in "robmorgan/phinx"
version 0.15.2
being installed.
The error remained when running vendor/bin/phinx rollback -t 0
.
Update: I am sorry for possibly causing confusion. The error was solved on our side, as we actually did not use vendor/bin/phinx rollback -t 0
but rather vendor/bin/phinx migrate -t {existing migration number}
which does not work.
When using the correct -d
parameter it works fine. It seems that the -d
option should be used when migrating down instead of the -t
which fails if the migration version was already migrated.
The docs on migrate
tell this:
The migrate command runs all available migrations, optionally up to a specific version
phinx migrate -e development
phinx migrate -e development -t 20110103081132
phinx migrate -e development -d 20110103
phinx migrate -e development -v
You haven't "solved" anything as such - you've found a genuine bug. I've opened a more detailed issue at https://github.com/cakephp/phinx/issues/2240.
Solved and merged, thx @wallacio
./bin/cake migrations migrate -t 20231019152508