I just ran into an issue while running a production deploy using capistrano. We had just finished a large refactor that contained a lot of database migrations.
During the deploy, the worst thing possible happened and my ssh connection dropped, while cap was running through the migrations.
I think there's an issue with sshing through our load balancer but thats beside the point.
I managed to get the migrations to fully run by running screen on the server, migrating here, and deploying afterward.
The app is now up and seems to be working fine, but I was just wondering does anyone know how capistrano handles migrations if the connection is interrupted?
Can I be sure the the migration executing when the connection dropped was completed?
What are the chances of half performed or migrations performed twice?
I would assume that cap wraps each migration in a db transaction that would rollback if an error occurred, would this be the case?