Lorsque je fais ma migration depuis 0.19 vers 0.22 j'ai l'erreur suivante à l'étape 5 :
using migration paths
- /home/danslenu/www/germatt/src/migrations
using seed paths
using environment production
using database danslenudba1
using table prefix
ordering by creation time
== 20220730083854 RemovesGroupsTable: migrating
== 20220730083854 RemovesGroupsTable: migrated 59.5712s
== 20220826113248 CreateGroupsProfile: migrating
PDOException: SQLSTATE[HY000]: General error: 1832 Cannot change column 'beneficiary_id': used in a foreign key constraint 'fk__event_beneficiary__beneficiary' in /home/danslenu/www/germatt/vendors/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:192
Stack trace:
#0 /home/danslenu/www/germatt/vendors/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(192): PDO->exec('ALTER TABLE `ev...')
#1 /home/danslenu/www/germatt/vendors/robmorgan/phinx/src/Phinx/Db/Util/AlterInstructions.php(108): Phinx\Db\Adapter\PdoAdapter->execute('ALTER TABLE `ev...')
#2 /home/danslenu/www/germatt/vendors/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(626): Phinx\Db\Util\AlterInstructions->execute('ALTER TABLE `ev...', Array)
#3 /home/danslenu/www/germatt/vendors/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(1001): Phinx\Db\Adapter\PdoAdapter->executeAlterSteps('event_beneficia...', Object(Phinx\Db\Util\AlterInstructions))
#4 /home/danslenu/www/germatt/vendors/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php(477): Phinx\Db\Adapter\PdoAdapter->executeActions(Object(Phinx\Db\Table\Table), Array)
#5 /home/danslenu/www/germatt/vendors/robmorgan/phinx/src/Phinx/Db/Adapter/TimedOutputAdapter.php(420): Phinx\Db\Adapter\AdapterWrapper->executeActions(Object(Phinx\Db\Table\Table), Array)
#6 /home/danslenu/www/germatt/vendors/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php(477): Phinx\Db\Adapter\TimedOutputAdapter->executeActions(Object(Phinx\Db\Table\Table), Array)
#7 /home/danslenu/www/germatt/vendors/robmorgan/phinx/src/Phinx/Db/Adapter/TablePrefixAdapter.php(492): Phinx\Db\Adapter\AdapterWrapper->executeActions(Object(Phinx\Db\Table\Table), Array)
#8 /home/danslenu/www/germatt/vendors/robmorgan/phinx/src/Phinx/Db/Plan/Plan.php(151): Phinx\Db\Adapter\TablePrefixAdapter->executeActions(Object(Phinx\Db\Table\Table), Array)
#9 /home/danslenu/www/germatt/vendors/robmorgan/phinx/src/Phinx/Db/Table.php(719): Phinx\Db\Plan\Plan->execute(Object(Phinx\Db\Adapter\TablePrefixAdapter))
#10 /home/danslenu/www/germatt/vendors/robmorgan/phinx/src/Phinx/Db/Table.php(627): Phinx\Db\Table->executeActions(true)
#11 /home/danslenu/www/germatt/src/migrations/20220826113248_create_groups_profile.php(138): Phinx\Db\Table->update()
#12 /home/danslenu/www/germatt/vendors/robmorgan/phinx/src/Phinx/Migration/Manager/Environment.php(111): CreateGroupsProfile->up()
#13 /home/danslenu/www/germatt/vendors/robmorgan/phinx/src/Phinx/Migration/Manager.php(388): Phinx\Migration\Manager\Environment->executeMigration(Object(CreateGroupsProfile), 'up', false)
#14 /home/danslenu/www/germatt/vendors/robmorgan/phinx/src/Phinx/Migration/Manager.php(359): Phinx\Migration\Manager->executeMigration('production', Object(CreateGroupsProfile), 'up', false)
#15 /home/danslenu/www/germatt/vendors/robmorgan/phinx/src/Phinx/Console/Command/Migrate.php(122): Phinx\Migration\Manager->migrate('production', 20230810083722, false)
#16 /home/danslenu/www/germatt/src/App/Console/Command/Migrations/ConfigurationTrait.php(67): Phinx\Console\Command\Migrate->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\StreamOutput))
#17 /home/danslenu/www/germatt/vendors/symfony/console/Command/Command.php(291): Loxya\Console\Command\Migrations\MigrateCommand->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\StreamOutput))
#18 /home/danslenu/www/germatt/vendors/symfony/console/Application.php(1014): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\StreamOutput))
#19 /home/danslenu/www/germatt/src/App/Console/App.php(63): Symfony\Component\Console\Application->doRunCommand(Object(Loxya\Console\Command\Migrations\MigrateCommand), Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\StreamOutput))
#20 /home/danslenu/www/germatt/vendors/symfony/console/Application.php(301): Loxya\Console\App->doRunCommand(Object(Loxya\Console\Command\Migrations\MigrateCommand), Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\StreamOutput))
#21 /home/danslenu/www/germatt/src/App/Console/App.php(49): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\StreamOutput))
#22 /home/danslenu/www/germatt/src/install/Install.php(170): Loxya\Console\App->doRun(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\StreamOutput))
#23 /home/danslenu/www/germatt/src/install/Install.php(119): Loxya\Install\Install::_executePhinxCommand('migrate')
#24 /home/danslenu/www/germatt/src/App/Controllers/SetupController.php(97): Loxya\Install\Install::migrateDatabase()
#25 /home/danslenu/www/germatt/vendors/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(38): Loxya\Controllers\SetupController->index(Object(Loxya\Http\Request), Object(Slim\Http\Response), Array)
#26 /home/danslenu/www/germatt/vendors/slim/slim/Slim/Routing/Route.php(358): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Loxya\Http\Request), Object(Slim\Http\Response), Array)
#27 /home/danslenu/www/germatt/vendors/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\Routing\Route->handle(Object(Loxya\Http\Request))
#28 /home/danslenu/www/germatt/vendors/slim/slim/Slim/MiddlewareDispatcher.php(65): Slim\MiddlewareDispatcher->handle(Object(Loxya\Http\Request))
#29 /home/danslenu/www/germatt/vendors/slim/slim/Slim/Routing/Route.php(315): Slim\MiddlewareDispatcher->handle(Object(Loxya\Http\Request))
#30 /home/danslenu/www/germatt/vendors/slim/slim/Slim/Routing/RouteRunner.php(68): Slim\Routing\Route->run(Object(Loxya\Http\Request))
#31 /home/danslenu/www/germatt/src/App/Middlewares/BodyParser.php(62): Slim\Routing\RouteRunner->handle(Object(Loxya\Http\Request))
#32 /home/danslenu/www/germatt/vendors/slim/slim/Slim/MiddlewareDispatcher.php(121): Loxya\Middlewares\BodyParser->process(Object(Loxya\Http\Request), Object(Slim\Routing\RouteRunner))
#33 /home/danslenu/www/germatt/src/App/Middlewares/Acl.php(35): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Loxya\Http\Request))
#34 /home/danslenu/www/germatt/vendors/slim/slim/Slim/MiddlewareDispatcher.php(269): Loxya\Middlewares\Acl->__invoke(Object(Loxya\Http\Request), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#35 /home/danslenu/www/germatt/src/App/Services/Auth.php(36): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Loxya\Http\Request))
#36 /home/danslenu/www/germatt/vendors/slim/slim/Slim/MiddlewareDispatcher.php(269): Loxya\Services\Auth->middleware(Object(Loxya\Http\Request), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#37 /home/danslenu/www/germatt/src/App/Middlewares/Pagination.php(20): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Loxya\Http\Request))
#38 /home/danslenu/www/germatt/vendors/slim/slim/Slim/MiddlewareDispatcher.php(269): Loxya\Middlewares\Pagination->__invoke(Object(Loxya\Http\Request), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#39 /home/danslenu/www/germatt/vendors/slim/slim/Slim/Middleware/RoutingMiddleware.php(45): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Loxya\Http\Request))
#40 /home/danslenu/www/germatt/vendors/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\RoutingMiddleware->process(Object(Loxya\Http\Request), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#41 /home/danslenu/www/germatt/vendors/slim/slim/Slim/Middleware/ErrorMiddleware.php(76): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Loxya\Http\Request))
#42 /home/danslenu/www/germatt/vendors/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\Middleware\ErrorMiddleware->process(Object(Loxya\Http\Request), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#43 /home/danslenu/www/germatt/vendors/slim/http-cache/src/Cache.php(67): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Loxya\Http\Request))
#44 /home/danslenu/www/germatt/vendors/slim/slim/Slim/MiddlewareDispatcher.php(121): Slim\HttpCache\Cache->process(Object(Loxya\Http\Request), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#45 /home/danslenu/www/germatt/vendors/slim/slim/Slim/MiddlewareDispatcher.php(65): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Loxya\Http\Request))
#46 /home/danslenu/www/germatt/vendors/slim/slim/Slim/App.php(199): Slim\MiddlewareDispatcher->handle(Object(Loxya\Http\Request))
#47 /home/danslenu/www/germatt/vendors/slim/slim/Slim/App.php(183): Slim\App->handle(Object(Loxya\Http\Request))
#48 /home/danslenu/www/germatt/src/App/App.php(54): Slim\App->run(Object(Loxya\Http\Request))
#49 /home/danslenu/www/germatt/src/public/index.php(17): Loxya\App->run()
#50 {main}
Par rapport à la discussion https://forum.robertmanager.org/d/362-erreur-migration-base-de-donnee-019-vers-022/12, j'ai bien l'étape "RemovesGroupsTable" à Down avant de commencer la migration.
Elle passe à Up une fois que j'ai l'erreur.
Merci d'avance pour votre aide ! 🙂