J'ai remis la base de donnée 0.19
Ensuite je suis à l'étape 5 :
5 - Structure de la base de données
Impeccable ! Robert peut maintenant se connecter à sa base de données. De plus, la configuration a été créée sur le serveur, dans le fichier App/Config/settings.json.
Bien joué !
OK, maintenant, il est temps de créer la structure de la base de données. Vous n'avez rien de spécial à faire, à part cliquer sur le bouton "Étape suivante" ci-dessous. L'assistant créera la structure pour vous.
Liste des migrations :
CreateCountries : Up
CreateTags : Up
CreateUsers : Up
CreateParks : Up
CreateCategories : Up
CreateMaterials : Up
CreateCompanies : Up
CreatePersons : Up
CreateEvents : Up
CreateGroupsOfUsers : Up
CreateTaggables : Up
SubCategoryNullForMaterials : Up
CreateUserSettings : Up
ChangeSubCategoriesUnicityConstraint : Up
AddQuantityToEventsMaterialsPivot : Up
AddInformationsToParks : Up
CreateMaterialAttributes : Up
FixEventsLocationNullability : Up
CreateBills : Up
AddIsDiscountableToMaterials : Up
AddIsBillableToEvents : Up
FixTaggablesPrimaryConstraint : Up
AddReferenceToEvents : Up
RemovesMaterialsSerialNumber : Up
CreateUnitsTables : Up
ChangesMaterialUnitsConstraint : Up
AddParkIdInMaterialUnit : Up
AddAttributesCategoriesRelation : Up
AddDateTypeToAttributes : Up
CreateDocuments : Up
CreateUserRestrictedParks : Up
ChangeMaterialAttributesRelationship : Up
AddCasFieldsToUsers : Up
CreateEstimates : Up
AddReferenceToPersons : Up
AddPositionToEventAssignees : Up
AddPictureToMaterials : Up
AddReferenceToMaterialUnits : Up
AddReturnQuantitiesToEventMaterials : Up
AddIsReturnInventoryDoneToEvents : Up
AddIsArchivedToEvents : Up
CreateInventories : Up
CreateMaterialUnitStates : Up
AddFieldsToMaterialUnits : Up
CreateSettings : Up
AddOwnerToMaterialUnits : Up
CreateInventoriesMaterials : Up
FixEventUserConstraint : Up
AddIsReturnedToEventMaterialUnits : Up
ChangeMaterialUnitStates : Up
AddStateToInventoryMaterialUnits : Up
ChangeEventAssigneesToTechnicians : Up
ChangeEventDescriptionToText : Up
ChangeMaterialCategoryConstraint : Up
CreateListTemplates : Up
ChangeEventLocationToText : Up
AddNewSettings : Up
ImprovesSettings : Up
AddNewSetting : Up
AddPublicCalendarSettings : Up
UpgradeDegressiveRateFields : Up
RemovesTagsFromCompanies : Up
RemoveInvalidDatesFromMaterialAttributes : Up
AllowUncategorizedMaterials : Up
MoveUploadedFiles : Up
AllowEmptyRentalPrice : Up
RemovesGroupsTable : Up
CreateGroupsProfile : Down
CreateCarts : Down
CreateReservations : Down
ReOrderUnitStates : Down
AddExternalGroup : Down
FixOutOfOrderQuantities : Down
RenameQuantityReturnedBrokenField : Down
InflateAmountsFields : Down
ImproveBillsTable : Down
MergeUserSettingsAndAddNotificationsToggle : Down
(Down = migration à faire, Up = migration déjà en place)
Ensuite j'ai l'erreur :
using migration paths
- /home/alsaevenhc/gestion/src/migrations
using seed paths
using environment production
using database alsaevenhcsitew
using table prefix robert_
ordering by creation time
== 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/alsaevenhc/gestion/vendors/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:192
Stack trace:
#0 /home/alsaevenhc/gestion/vendors/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(192): PDO->exec('ALTER TABLE `ro...')
#1 /home/alsaevenhc/gestion/vendors/robmorgan/phinx/src/Phinx/Db/Util/AlterInstructions.php(108): Phinx\Db\Adapter\PdoAdapter->execute('ALTER TABLE `ro...')
#2 /home/alsaevenhc/gestion/vendors/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(626): Phinx\Db\Util\AlterInstructions->execute('ALTER TABLE `ro...', Array)
#3 /home/alsaevenhc/gestion/vendors/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php(1001): Phinx\Db\Adapter\PdoAdapter->executeAlterSteps('robert_event_be...', Object(Phinx\Db\Util\AlterInstructions))
#4 /home/alsaevenhc/gestion/vendors/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php(477): Phinx\Db\Adapter\PdoAdapter->executeActions(Object(Phinx\Db\Table\Table), Array)
#5 /home/alsaevenhc/gestion/vendors/robmorgan/phinx/src/Phinx/Db/Adapter/TimedOutputAdapter.php(420): Phinx\Db\Adapter\AdapterWrapper->executeActions(Object(Phinx\Db\Table\Table), Array)
#6 /home/alsaevenhc/gestion/vendors/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php(477): Phinx\Db\Adapter\TimedOutputAdapter->executeActions(Object(Phinx\Db\Table\Table), Array)
#7 /home/alsaevenhc/gestion/vendors/robmorgan/phinx/src/Phinx/Db/Adapter/TablePrefixAdapter.php(492): Phinx\Db\Adapter\AdapterWrapper->executeActions(Object(Phinx\Db\Table\Table), Array)
#8 /home/alsaevenhc/gestion/vendors/robmorgan/phinx/src/Phinx/Db/Plan/Plan.php(151): Phinx\Db\Adapter\TablePrefixAdapter->executeActions(Object(Phinx\Db\Table\Table), Array)
#9 /home/alsaevenhc/gestion/vendors/robmorgan/phinx/src/Phinx/Db/Table.php(716): Phinx\Db\Plan\Plan->execute(Object(Phinx\Db\Adapter\TablePrefixAdapter))
#10 /home/alsaevenhc/gestion/vendors/robmorgan/phinx/src/Phinx/Db/Table.php(624): Phinx\Db\Table->executeActions(true)
#11 /home/alsaevenhc/gestion/src/migrations/20220826113248_create_groups_profile.php(138): Phinx\Db\Table->update()
#12 /home/alsaevenhc/gestion/vendors/robmorgan/phinx/src/Phinx/Migration/Manager/Environment.php(111): CreateGroupsProfile->up()
#13 /home/alsaevenhc/gestion/vendors/robmorgan/phinx/src/Phinx/Migration/Manager.php(388): Phinx\Migration\Manager\Environment->executeMigration(Object(CreateGroupsProfile), 'up', false)
#14 /home/alsaevenhc/gestion/vendors/robmorgan/phinx/src/Phinx/Migration/Manager.php(359): Phinx\Migration\Manager->executeMigration('production', Object(CreateGroupsProfile), 'up', false)
#15 /home/alsaevenhc/gestion/vendors/robmorgan/phinx/src/Phinx/Console/Command/Migrate.php(122): Phinx\Migration\Manager->migrate('production', 20230302180016, false)
#16 /home/alsaevenhc/gestion/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/alsaevenhc/gestion/vendors/symfony/console/Command/Command.php(291): Robert2\API\Console\Command\Migrations\MigrateCommand->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\StreamOutput))
#18 /home/alsaevenhc/gestion/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/alsaevenhc/gestion/src/App/Console/App.php(63): Symfony\Component\Console\Application->doRunCommand(Object(Robert2\API\Console\Command\Migrations\MigrateCommand), Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\StreamOutput))
#20 /home/alsaevenhc/gestion/vendors/symfony/console/Application.php(301): Robert2\API\Console\App->doRunCommand(Object(Robert2\API\Console\Command\Migrations\MigrateCommand), Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\StreamOutput))
#21 /home/alsaevenhc/gestion/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/alsaevenhc/gestion/src/install/Install.php(169): Robert2\API\Console\App->doRun(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\StreamOutput))
#23 /home/alsaevenhc/gestion/src/install/Install.php(118): Robert2\Install\Install::_executePhinxCommand('migrate')
#24 /home/alsaevenhc/gestion/src/App/Controllers/SetupController.php(100): Robert2\Install\Install::migrateDatabase()
#25 /home/alsaevenhc/gestion/vendors/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(43): Robert2\API\Controllers\SetupController->index(Object(Robert2\API\Http\Request), Object(Slim\Http\Response), Array)
#26 /home/alsaevenhc/gestion/vendors/slim/slim/Slim/Routing/Route.php(384): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Robert2\API\Http\Request), Object(Slim\Http\Response), Array)
#27 /home/alsaevenhc/gestion/vendors/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\Routing\Route->handle(Object(Robert2\API\Http\Request))
#28 /home/alsaevenhc/gestion/vendors/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\MiddlewareDispatcher->handle(Object(Robert2\API\Http\Request))
#29 /home/alsaevenhc/gestion/vendors/slim/slim/Slim/Routing/Route.php(341): Slim\MiddlewareDispatcher->handle(Object(Robert2\API\Http\Request))
#30 /home/alsaevenhc/gestion/vendors/slim/slim/Slim/Routing/RouteRunner.php(84): Slim\Routing\Route->run(Object(Robert2\API\Http\Request))
#31 /home/alsaevenhc/gestion/src/App/Middlewares/BodyParser.php(62): Slim\Routing\RouteRunner->handle(Object(Robert2\API\Http\Request))
#32 /home/alsaevenhc/gestion/vendors/slim/slim/Slim/MiddlewareDispatcher.php(147): Robert2\API\Middlewares\BodyParser->process(Object(Robert2\API\Http\Request), Object(Slim\Routing\RouteRunner))
#33 /home/alsaevenhc/gestion/src/App/Middlewares/Acl.php(35): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Robert2\API\Http\Request))
#34 /home/alsaevenhc/gestion/vendors/slim/slim/Slim/MiddlewareDispatcher.php(313): Robert2\API\Middlewares\Acl->__invoke(Object(Robert2\API\Http\Request), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#35 /home/alsaevenhc/gestion/src/App/Services/Auth.php(37): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Robert2\API\Http\Request))
#36 /home/alsaevenhc/gestion/vendors/slim/slim/Slim/MiddlewareDispatcher.php(313): Robert2\API\Services\Auth->middleware(Object(Robert2\API\Http\Request), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#37 /home/alsaevenhc/gestion/src/App/Middlewares/Pagination.php(20): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Robert2\API\Http\Request))
#38 /home/alsaevenhc/gestion/vendors/slim/slim/Slim/MiddlewareDispatcher.php(313): Robert2\API\Middlewares\Pagination->__invoke(Object(Robert2\API\Http\Request), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#39 /home/alsaevenhc/gestion/vendors/slim/slim/Slim/Middleware/RoutingMiddleware.php(59): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Robert2\API\Http\Request))
#40 /home/alsaevenhc/gestion/vendors/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\RoutingMiddleware->process(Object(Robert2\API\Http\Request), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#41 /home/alsaevenhc/gestion/vendors/slim/slim/Slim/Middleware/ErrorMiddleware.php(107): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Robert2\API\Http\Request))
#42 /home/alsaevenhc/gestion/vendors/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\Middleware\ErrorMiddleware->process(Object(Robert2\API\Http\Request), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#43 /home/alsaevenhc/gestion/vendors/slim/http-cache/src/Cache.php(67): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Robert2\API\Http\Request))
#44 /home/alsaevenhc/gestion/vendors/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\HttpCache\Cache->process(Object(Robert2\API\Http\Request), Object(Psr\Http\Server\RequestHandlerInterface@anonymous))
#45 /home/alsaevenhc/gestion/vendors/slim/slim/Slim/MiddlewareDispatcher.php(81): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Robert2\API\Http\Request))
#46 /home/alsaevenhc/gestion/vendors/slim/slim/Slim/App.php(215): Slim\MiddlewareDispatcher->handle(Object(Robert2\API\Http\Request))
#47 /home/alsaevenhc/gestion/vendors/slim/slim/Slim/App.php(199): Slim\App->handle(Object(Robert2\API\Http\Request))
#48 /home/alsaevenhc/gestion/src/App/App.php(51): Slim\App->run(Object(Robert2\API\Http\Request))
#49 /home/alsaevenhc/gestion/src/public/index.php(17): Robert2\API\App->run()
#50 {main}