Unbreakable Laravel Migrations
Published on by Eric L. Barnes
Antonio Carlos Ribeiro has a new tutorial for wrapping migrations in transactions:
The problem, of course, isn’t in Laravel, but in my inability to do things right in the first try. The answer for me was to wrap them in a transaction layer, so, if something bad happens during a migrate command, the whole process is rolled back and I can just fix the migration and try again.
Eric is the creator of Laravel News and has been covering Laravel since 2012.