Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delete old migrations differences

How can I delete the old migrations differences? When doing doctrine:generate-migrations-diff I get no problems, but when doing the doctrine:migrate I get problems. It seems as if doctrine is trying to migrate old stuff that doesnt "count" any longer ...

Thanks

like image 458
Johannes Avatar asked Feb 03 '11 10:02

Johannes


2 Answers

Just to complement the selected answer (from the documentation):

Adding a version:

./doctrine migrations:version YYYYMMDDHHMMSS --add

Deleting a version:

./doctrine migrations:version YYYYMMDDHHMMSS --delete

The command does not execute any migrations code, it simply adds the specified version to the database.

More info

like image 66
Ain Tohvri Avatar answered Oct 03 '22 07:10

Ain Tohvri


Either delete the migration class or add the generate version table (can't remember the exact name) and set the value to the migration you want start from.

like image 23
xzyfer Avatar answered Oct 03 '22 06:10

xzyfer