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

Corrections diverses scripts migration

parent 5e2223da
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ class v18Plafonds extends AbstractMigration

    public function utile(): bool
    {
        return $this->manager->hasNew('table', 'PLAFOND_PERIMETRE');
        return $this->manager->hasNew('table', 'PLAFOND_PERIMETRE') || $this->manager->hasTable('SAVE_V18_PLAFOND');
    }


@@ -71,7 +71,7 @@ class v18Plafonds extends AbstractMigration
        }

        if (!empty($bdd->table()->get('PLAFOND'))) {
            $bdd->exec('DROP TABLE PLAFOND');
            $bdd->exec('DROP TABLE PLAFOND CASCADE CONSTRAINTS');
            $c->msg('Suppression des anciens plafonds');
        }
    }
+1 −2
Original line number Diff line number Diff line
@@ -78,8 +78,7 @@ class v18Statuts extends AbstractMigration

        $ddl = $bdd->table()->get('TBL_WORKFLOW')['TBL_WORKFLOW'];
        if (!isset($ddl['columns']['STATUT_ID'])) {
            $bdd->exec('DROP TABLE WF_DEP_BLOQUANTE');
            $bdd->exec('DROP TABLE TBL_WORKFLOW');
            $bdd->exec('DROP TABLE TBL_WORKFLOW CASCADE CONSTRAINTS');
            $c->msg('Suppression de la table TBL_WORKFLOW, qui sera recréée au nouveau format');
        }