Doctrine Migration reset

3,493 views
Skip to first unread message

james fuji

unread,
Jun 8, 2011, 5:54:52 AM6/8/11
to diem-users
Hello, my migration fails with a lot of errors, so i want make a last
dm:setup --clear-db and then i could do migration

so how can i reset migrations to the new dm:setup --clear-db ?


thank you

Stéphane

unread,
Jun 8, 2011, 6:05:56 AM6/8/11
to diem-...@googlegroups.com
Hello,

delete files in lib/migrations

Also, when you dm:setup --clear-db you don't have to care about migrations as the database will be DROPped and reCREATEed with latest schema information :)

Regards,



Before Printing, Think about Your Environmental Responsibility!
Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale!

Richard

unread,
Jun 25, 2014, 3:42:24 PM6/25/14
to diem-...@googlegroups.com
what does the trick for me is to keep all the files in lib/migrations/odctrine and delete all the content in up() and down() functions.
Run php symfony doctrine:generate-migrations-diff
and migrate from version 0 to X where X is the last generated migration.
Reply all
Reply to author
Forward
0 new messages