Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Do not store migration status in a config file?
  • Hi, Is there a way (without editing the Oil package) to have Oil NOT save the migration version to the config file (usually .../config/migrations.php). Given the active version of the migration status for each app/module is stored within the DB and the migrations are typically used to update the DB having them stored here seems enough. I also don't want my migration.php files being updated and then stored back within Version control but adding a migrations.php file outside of the version controlled folder structure is annoying. I've also renamed the table being used so I DO need to keep the file for that purpose. I just DO NOT want it to keep changing the version numbers in the config file and really want to try and avoid overriding some of the core packages if I can avoid it? Thats not to say I can't / won't but just becomes more hassle to maintain.
    Thanks, Richard
  • What about adding the file to your version control's ignore list?
  • I still want to set 'migration settings' ie. the name of the table used for migrations. I already have a table called migrations in my application. Additionally when going to deploy the code the file is missing so it'll write to an earlier found copy of the same file. I also don't get the purpose of the versions getting stored within the config file? They are all in the DB anyway...is this a legacy feature?
    Richard
  • The idea is that number is *the* number you want people to be on. It means you can work on future migrations. Calling Migrate::current(); Will go to the version defined in the config file. Calling Migrate::latest(); Will go to the latest version possible. There are plenty of occasions when you need to work on a migration while you're writing the application, so you don't want everybody to migrate to it until you've finished.

Howdy, Stranger!

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

In this Discussion