Commit bc0bd227 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Affichage des erreurs pour la migration des statuts

parent 154c289c
Loading
Loading
Loading
Loading
+9 −3
Changes for admin/migration/v18Statuts.php: 9 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -37,39 +37,45 @@ class v18Statuts extends AbstractMigration

    public function before()
    {
        $bdd = $this->manager->getBdd();
        $c   = $this->manager->getOseAdmin()->getConsole();

        try {
            $this->preMigrationIndicateurs();
        } catch (\Exception $e) {
            $c->println($e->getMessage(), $c::COLOR_RED);
        }

        try {
            $this->preMigrationStatuts();
        } catch (\Exception $e) {
            $c->println($e->getMessage(), $c::COLOR_RED);
        }

        try {
            $this->preMigrationIntervenants();
        } catch (\Exception $e) {
            $c->println($e->getMessage(), $c::COLOR_RED);
        }

        try {
            $this->preMigrationDossiers();
        } catch (\Exception $e) {
            $c->println($e->getMessage(), $c::COLOR_RED);
        }

        try {
            $this->preMigrationTypePieceJointeStatuts();
        } catch (\Exception $e) {
            $c->println($e->getMessage(), $c::COLOR_RED);
        }

        try {
            $this->preMigrationTypeInterventionStatuts();
        } catch (\Exception $e) {
            $c->println($e->getMessage(), $c::COLOR_RED);
        }

        $bdd = $this->manager->getBdd();
        $c   = $this->manager->getOseAdmin()->getConsole();

        $ddl = $bdd->table()->get('TBL_WORKFLOW')['TBL_WORKFLOW'];
        if (isset($ddl['columns']['STATUT_ID'])) {
            $bdd->exec('DROP TABLE TBL_WORKFLOW');