fuel / core

Fuel PHP Framework - The core of the Fuel v1 framework
http://fuelphp.com
813 stars 345 forks source link

Migrations do not support environments #901

Closed kenjis closed 12 years ago

kenjis commented 12 years ago

Current Migrations only updates "core/config/migrations.php" or "app/config/migrations.php" and does not support Environments.

But developers may use one installation as both development and test environments.

See: http://fuelphp.com/forums/topics/view/8566

rob-mccann commented 12 years ago

Do you mean this:

php oil r migrate --env=production ?

WanWizard commented 12 years ago

No, the problem is that the state of the migration is written to the config file app/config/migrations.php. Which means your application can only have one state.

If you want to support multiple environments within a single application installation, this file needs to be in the environment folder, not in the main folder.

kenjis commented 12 years ago

And env FUEL_ENV test php oil r migrate reads "config/test/migrations.php", but writes the state to "config/migrations.php"

kenjis commented 12 years ago

fixed https://github.com/fuel/core/commit/3c92f7c975807afb6065901fb8b48fa269c13cd9

WanWizard commented 12 years ago

Indeed. Forgot to close this one.