ilyyrw
Last Updated: February 25, 2016
·
1.765K
· emgiezet
736212 10200976756252420 836055407 o

Auto generated doctrine migrations don't execute in transaction

When you're applying an auto-generated doctrine migrations to your environment ex. staging or production. Remember to test it well. Because they executing sql by sql. And when last migration throws PDOException you're in serious trouble. How serious? It depends on environment :).

Before you reapply the migration you need to clean up your database bit by bit ex. removing added columns dropping indexes etc.

Conclusion.
1. Test your migration on your local development station!
2. Always Backup that DB you're migrating!
3. Again first test and later trust the generated migration!

Say Thanks
Respond