-
Notifications
You must be signed in to change notification settings - Fork 116
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
Add Migrations middleware #774
base: 4.x
Are you sure you want to change the base?
Conversation
2fe40d5
to
3f11d89
Compare
I can think of plugins which do contain migrations which I don't want/need to run in my app because I just use parts of that plugin (e.g. this one). |
The plugins list is already opt-in by default, so if you dont specify a plugin it would not run the check on it. |
4d1bfb2
to
cbc0eab
Compare
It works now for app and plugins, you can provide a list of plugins, otherwise only app. Anything else? Or does this only need tests etc to get finished up? Also removed some dead dormant code that wasnt been used for a while. |
I might need a bit of help with the tests, also because they seem to leak to stdout |
Ideas that could also be done as part of a follow up PR
|
Resolves #317
This does require a bit more manual work.
Also, this wouldn't yet allow including plugin migrations
My idea here would be to look for all
*_phinxlog
tables in the DB and reverse engineer the plugins from themAlternatively, we could provide a config here to inject:
'plugins' => ...
Then we could also iterate over them in the middleware.
Furthermore, we could check on a query string
skip-migration-check
= 1 and if so, also behave like non debug mode.This can be useful if you need to check something prior to actually running it locally.