-
Notifications
You must be signed in to change notification settings - Fork 96
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
Deploy with Capistrano #14
Comments
Sounds like the easiest way to do it indeed. |
When you say rollback do you mean that if during a deploy, the migrations complete but then the deploy fails after that, so you want to rollback any DB changes? |
yes, but also there is another case where the deploy succeeds, but you then want to roll it back anyway. In that case, you need to read the version from the schema.txt file of the OLD deploy. It is not currently written to the schema.txt so this would not be possible. |
is this issue still valid ? if you want to rollback, you can do |
@salimane -- |
One way to implement this might be to add a new ruckus command which rolls back any migrations which are found in the Then, in capistrano, after reverting the ( "you need to read the version from the schema.txt file of the OLD deploy" -- this approach would work in projects where the DB history is completely linear, but not on projects which have branches + merges. The version number is not sufficient to uniquely identify a DB version in those cases. ) |
So I'm easily able to go up with the migrations on Capistrano deploy.
I would like to implement going down on Capistrano rollback, how would you go about that?
Something like this, or is there any easier way?
On deploy, read from the db and save the belonging db version number in a file in the deployed directory.
Then on rollback, read from the file and take the db back to the right version.
The text was updated successfully, but these errors were encountered: