Open anwar-gazi opened 8 years ago
@minhaj-resgef there is not currently a force command, although I have plans for one.
proposed syntax:
phinx migrate --force 2923092109
hi dev, thanks, is there any way to manually clear that cache?
Sent from my phone. On Dec 15, 2015 3:57 PM, "Rob Morgan" notifications@github.com wrote:
@minhaj-resgef https://github.com/minhaj-resgef there is not currently a force command, although I have plans for one.
— Reply to this email directly or view it on GitHub https://github.com/robmorgan/phinx/issues/717#issuecomment-164707429.
@minhaj-resgef yes, open your database. Find the phinxlog
table and deleted the specified row that represents your migration.,
I've written a php script to do that automatically. And further, added a -f switch to delete migration history and run again. I want to share the code.
The best way I have to try out migrations while developing is this:
down()
what has not runmigrate rollback
up()
, uncomment pieces of down()
migrate
You basically revert the half-migration using its own down()
until you get it right. This way you do not have to deal with half-changes in the database or phinxlog
table by hand.
I executed a migration which gone wrong, so next time I fixed the code inside that migration and then tried the php -f migration command but this time that migration didn't run