-
-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
php bakery migrate:rollback missing class errors #1002
Comments
Can you pinpoint where this exception is thrown ? |
It seems to be from this line Rather than trying to modify anything in any of the |
That might be a good idea... |
|
Okay, based off the comment I found here, it seems the intention is to actually have the rollback continue in these cases of missing classes... |
I remember that comment... At some point there was no way to display a warning from the migrator to the CLI as the migrator could be run independently from the CLI. I think the note thing solved that issue? As long as the warning is displayed, I guess it should be fine to skip the migration. It might still break stuff, but nothing more can be done anyway if the class doesn't exist anymore... |
There might be other situations where that note is still needed but when running On another note, I was looking through the debug trace I posted above and I am a bit confused about something. At line 2:
Inside I would have expected this to call the method at this line inside the But if you look at the stack trace:
It actually calls the same method but from the I am just curious as to why that happens here. |
Fixed in 4.2.3 by PR #1007 |
Trying to run
php bakery migrate:rollback
will fail if there is a missing migration class, even if it is not in the last batch that was ran.It seems it shouldn't matter if a migration class is missing unless that class is part of the last batch ran, since
php bakery migrate:rollback
just reverses the most recent migration. Unlessmigrations
!=batches
?The text was updated successfully, but these errors were encountered: