-
Notifications
You must be signed in to change notification settings - Fork 891
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
After migrations event #1427
Comments
I have a repeatables process which does this. I was originally looking to do this in Phinx, but the codebase at the time didn't make it too easy to fit in (my opinion). The main issues our team had was that migrations are a very bad fit for repeatables (stored procedures, views, functions, triggers, etc. DDLs). Especially in a multi-developer, multi-branch environment. Repeatables cannot easily be delta'd, so you cannot say add this column to a view, or change this line of code in a trigger. Only the complete view, the complete trigger can be sent to the SQL server. We found that whilst migrations use a version number in their own logic, versioning of repeatables is done in source control. This resolves all the issues we experienced - so far. Rolling back requires a rollback of the source code, but invariably the old form of a view requires the older code, so it all makes sense in one way. For your issue though, you could use your shell to do the work. Something along the lines of ...
If Phinx executes successfully, then your-command will run. If Phinx fails, your-command will not be run. |
@rquadling You have absolutely true, but it is very easy to forgot add I think that it can be useful to have something like "after all migrations is done, run this script" event, where you can use the power of Phinx and his configuration to run "Deploy and rebuild all packages and procedures" nicely by just one simple command |
OOI, #1382 may be of interest! (Even after I had my own use case for this feature, I'd forgotten about it!) |
We are looking for something like "After all migrations event", where we need to call something like "Rebuild and check all DB procedure".
Will it be possible to add this feature please?
The text was updated successfully, but these errors were encountered: