Context
Schema DDL is managed by FuelPHP's migration module (fuelphp/fuel/app/migrations/NNN_*.php). Two problems make it unfit for the FuelPHP→Laravel migration:
- Strict sequential ordinals (
001_, 002_...). Two branches both adding 008_* collide and force a renumber + retest. Applied-state config (app/config/<env>/migrations.php) is auto-generated and not git-tracked, so state diverges across machines and CI.
- FuelPHP-only. The
DBUtil API and migration table don't carry to Laravel.
Decision recorded in ADR-016 (docs/adr/016-database-migrations-phinx.md).
Approach
Phinx as a transitional runner, deleted at Laravel cutover. The 7 existing FuelPHP migrations are already applied everywhere - dump the live schema to a committed bootstrap.sql baseline, delete the FuelPHP migration files, Phinx runs on top.
- Phinx pinned to
0.13.x (last PHP 7.4 line; FuelPHP container is 7.4.33), require-dev in fuelphp/composer.json
fuelphp/migrations/ + fuelphp/phinx.php, version_order: creation (timestamp ordering kills ordinal collisions)
phinx.php reads getenv() directly - not a Config-over-getenv violation, Phinx runs outside the FuelPHP bootstrap
- fresh env: load
bootstrap.sql -> phinx migrate
Scope
Not doing now
Laravel migrations. At cutover: php artisan schema:dump snapshots the live schema as Laravel's baseline, drop phinxlog, remove Phinx + fuelphp/migrations/. Phinx and Laravel never conflict (separate tracking tables); no compatibility work needed.
Context
Schema DDL is managed by FuelPHP's migration module (
fuelphp/fuel/app/migrations/NNN_*.php). Two problems make it unfit for the FuelPHP→Laravel migration:001_,002_...). Two branches both adding008_*collide and force a renumber + retest. Applied-state config (app/config/<env>/migrations.php) is auto-generated and not git-tracked, so state diverges across machines and CI.DBUtilAPI andmigrationtable don't carry to Laravel.Decision recorded in ADR-016 (
docs/adr/016-database-migrations-phinx.md).Approach
Phinx as a transitional runner, deleted at Laravel cutover. The 7 existing FuelPHP migrations are already applied everywhere - dump the live schema to a committed
bootstrap.sqlbaseline, delete the FuelPHP migration files, Phinx runs on top.0.13.x(last PHP 7.4 line; FuelPHP container is 7.4.33),require-devinfuelphp/composer.jsonfuelphp/migrations/+fuelphp/phinx.php,version_order: creation(timestamp ordering kills ordinal collisions)phinx.phpreadsgetenv()directly - not a Config-over-getenv violation, Phinx runs outside the FuelPHP bootstrapbootstrap.sql->phinx migrateScope
composer require --dev robmorgan/phinx:^0.13infuelphp/fuelphp/phinx.phpconfig (mysql adapter fromRDS_*env,version_order: creation)fuelphp/migrations/bootstrap.sql(mysqldump --no-data, excludemigrationtable)fuelphp/fuel/app/migrations/*+ tracking configdb-migrate,db-rollback,db-migrate-status,db-migrate-create,db-bootstrap-dump,db-bootstrap-loadbootstrap.sqlload into fresh-env setup (make install)Not doing now
Laravel migrations. At cutover:
php artisan schema:dumpsnapshots the live schema as Laravel's baseline, dropphinxlog, remove Phinx +fuelphp/migrations/. Phinx and Laravel never conflict (separate tracking tables); no compatibility work needed.