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

Oubli suppression anciens indics

parent 35b3e788
Loading
Loading
Loading
Loading
+0 −27
Changes for admin/migration/v18Statuts.php: 0 added lines, 27 removed lines.
Original line number Diff line number Diff line
@@ -26,12 +26,6 @@ class v18Statuts extends AbstractMigration
        $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) {
@@ -124,27 +118,6 @@ class v18Statuts extends AbstractMigration



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

        $c->begin('Préparation à la mise à jour des indicateurs');
        if (!$this->manager->hasTable('TYPE_INDICATEUR')) {
            $bdd->exec('ALTER TABLE INDICATEUR ADD (TYPE_INDICATEUR_ID NUMBER)');
            $bdd->exec('CREATE TABLE TYPE_INDICATEUR (  
              ID NUMBER NOT NULL ENABLE,
              LIBELLE VARCHAR2(60 CHAR) NOT NULL ENABLE,
              ORDRE NUMBER DEFAULT 1 NOT NULL ENABLE
            )');
            $bdd->exec('INSERT INTO TYPE_INDICATEUR (ID, LIBELLE, ORDRE) VALUES (1,\'provisoire\', 1)');
            $bdd->exec('UPDATE INDICATEUR SET TYPE_INDICATEUR_ID = 1');
        }
        $c->end('Préparation à la migration des indicateurs terminée');
    }



    public function preMigrationStatuts()
    {
        $bdd = $this->manager->getBdd();