cakephpcakephp-3.xcakephp-3.4phinx

CakePHP 3 Skip Migration in Production


I have a Migration that failed in production after executing several commands that I can not execute again, is there a way to skip a migration?


Solution

  • There is a mark_migrated command you can use to set particular migrations as migrated and this will mark them as not needing to be run. CakePHP Documentation

    You can use the following where target is the timestamp of the migration you do not want to mark as not needing to be run.

    bin/cake migrations mark_migrated --target=20151016204000