I was wondering if anyone can tell me how Envoyer handles migration rollbacks, if at all?
Suppose my new deployments includes some new DB table migrations, and a few column additions to existing tables. If I discover a bug after deployment and I want to rollback the system to the state of the previous deployment, will the db changes/migrations be removed as well?
Envoy doesn't run any migrations for you automatically - any extra steps, such as a migration, can either:
Be done manually after a deployment
Be done using Envoyer's feature which lets you add before/after commands to run after the deployment steps
You can add a pre/post hook to call php artisan migrate
Rollbacks, however, are done via "re-deploying" an old release in your list of deployments. Unfortunately, there's no real distinction between a deploy and rollback, so running php artisan migrate:rollback is something you'll have to do manually I think (ssh into server and run the migrate:rollback command).
i guess one thing to help alleviate this is make sure your php aritsan migrate is as late into the deployment process as possible, so other problems won't affect it as much.