Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
How to regenerate migrations.php?
  • Hi,

    I accidently removed app/config/migrations.php and I found it impossible to run down migrations without migrations.php.
    Is there proper way to recover that removed migrations.php?

    Just a matter of interest, why does FuelPHP determine the current version from migrations.php not from the migrations table? [1]

    Best regards,

  • That is odd, as the table is leading, and the Migrate class will recreate the php file from the table data if it is missing or incomplete. It does that in its _init() method, upon load.

    Once both are in sync, it uses the config data, as that is stored in memory and doesn't require further database I/O.

    If it isn't recreated, check if your user has write rights in your app/config directory so it can create the migrations.php file.

    Also be careful that your web server user may need to be able to read it, so take care of the correct permissions if you use a commandline user to update files.
  • Hi,

    I appreciate your reply.
    I'll check the permissions and report its result.

    Thanks,

Howdy, Stranger!

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

In this Discussion