Doctrine migration process tips
octobre 2010
Has I’d to migrate few times and had always the same problem I would note how I resolved problem within migration process (you know, when an exception occures during migration… un finished database migration)
First : DB Dump
./mysqldump --add-drop-database -u DBUSER -p --databases DB > ~/DB-dropdb.sql
Second : Doctrine Migrate
php symfony doctrine:migrate
Then if everything’s fine you can continue, it something goes wrong, restore previous state :
./mysql -u DBUSER -p DB < ~/DB-dropdb.sql