Phinx: migrate:refresh and reset

Created on 16 Nov 2016  路  5Comments  路  Source: cakephp/phinx

it would be nice to be able to rollback all migrations in one go and maybe have a command that does both that and rerun all migrations.
This is mostly useful in dev environment.

feature

Most helpful comment

@nickcv-ln you can easily do this now with phinx migrate -e development -t 0

All 5 comments

@nickcv-ln you can easily do this now with phinx migrate -e development -t 0

And the use of breakpoints will allow you to mark the migrations that are in your production database so that you can rollback to target 0, but stop at the breakpoint.

It seems this would just be a wrapper around the above solution.

Closing due to lack of activity or out of scope. If there is new interest, please open a PR.

@othercorey Can this be reopened? @dereuromark has expressed interest in having the commands as defined by:

  • reset: rollback all migrations and put you back at starting point
  • refresh: drop all tables from database, and then run phinx migrate programmatically

I think this needs to be split up into discrete feature requests. They can link back to this.

Was this page helpful?
0 / 5 - 0 ratings