Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Fuelphp skips migrations!!!
  • For some reason, I was not able to migrate down on a migration just created, so I deleted the migration, and deleted the table manually.

    I migrated down from 031 to 026.. Next, I tried to migrate up, and it jumped from 026 to 034... (it did not go up in order)
    Next, I migrated  down again, and it went down to 025 (jump from 034 to 025)... migrating up, moved it up to 035.... I lost a lot of data, because it migrated down too far unexpectedly.

    Is there a way to fix this?
  • HarroHarro
    Accepted Answer
    Yeah, don't do that again!

    For the future, if you are stuck with a migration that doesn't want to migrate down, the first to attempt is to fix the migration. If that really doesn't work, make sure the down() method returns true.

    Your problem was manually modifying the table, but not adjusting the corresponding config file. Both have to be  in sync, otherwise strange things happen. As you have noticed.
  • Yes.. fortunately I was able to fix it.. I checked the migrations using refine migrate --version, and migrated down the one that was out of sync.

    Thank you for you time Harro Verton.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion