-
Notifications
You must be signed in to change notification settings - Fork 93
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
phpmig and capistrano #48
Comments
I'm open to anything really, but if it could be used with anything other than capistrano as well, that would be useful. How does capistrano do it for the rails migrations? |
For sure it's better if that works for the maximum of deployement's tools. By default capistrano handle rails db migration doing a simple But I have found some tricks where the idea is to have the migration version in the depot and rollback to it at the migration:rollback. What I suggest is not to have the max migration dump in a file but all the done migration, like that we can do a real migration diff between two app's version, or play with different branch on git. Do you see what I mean ? |
I know what you mean. It's been a long time since I used capistrano, does it work with symlinks, kind of like:
If so, could it be the case of just comparing the migrations returned from the current and previous version? I guess that could get a little complicated. I guess the other option would be to leave some artifacts behind during deployment, e.g. phpmig migrate -o log.json You could then have something to parse it and work backwards through the migrations that were done as part of that migration. |
Yes, it works with symlinks but only for the current path, there is no previous. I'm for the artifacts, but two things :
Like that there is nothing done just for capistrano, all that can be done by a new command or by adding some options on the existing one. |
Sorry to necro an old issue, but I'm using phpmig with Capistrano, this is what I've got in my deploy.rb for my project and works rather well (as a reference point):
hence to rollback change ./vendor/bin/phpmig migrate to /vendor/bin/phpmig rollback so you'd have a task that looks like this:
|
I'm looking to a way to handle database rollback on capistrano rollback.
One off the solution that I'm seeing is to dump migrations done in a file after each deploy.
Like that on rollback I could do a diff and rollback the newest migrations.
What do you think about that ?
Capistrano being a common deployement tools, what do you think about integrate capistrano's helper in phpmig ?
The text was updated successfully, but these errors were encountered: