Commit 754c02eb authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Ajout des TBL plafond pour calcul de feuilles de route

Correction soucis migration
parent 78ad80b0
Loading
Loading
Loading
Loading
+1 −1
Changes for admin/migration/v18Statuts.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -178,7 +178,7 @@ class v18Statuts extends AbstractMigration
            $c->msg('Anciens statuts "TYPE_AGREMENT_STATUT" sauvegardés dans "SAVE_V18_TA_STATUT".');
        }

        if (empty($bdd->table()->get('SAVE_V18_DOSSIER_AUTRE_STATUT'))) {
        if (!$this->manager->hasTable('SAVE_V18_DOSSIER_AUTRE_STATUT') && $this->manager->hasTable('DOSSIER_CHAMP_AUTRE_PAR_STATUT')) {
            $this->manager->sauvegarderTable('DOSSIER_CHAMP_AUTRE_PAR_STATUT', 'SAVE_V18_DOSSIER_AUTRE_STATUT');
            $c->msg('Anciens statuts "DOSSIER_CHAMP_AUTRE_PAR_STATUT" sauvegardés dans "SAVE_V18_DOSSIER_AUTRE_STATUT".');
        }
+14 −0
Changes for admin/src/MigrationManager.php: 14 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -128,6 +128,20 @@ class MigrationManager



    /**
     * Détermine si une table existe dans la base de données avant migration
     *
     * @param string $tableName
     *
     * @return bool
     */
    public function hasTable(string $tableName): bool
    {
        return isset($this->old->get(Ddl::TABLE)[$tableName]);
    }



    /**
     * Détermine si une colonne existe dans la base de données avant migration
     *
+5 −5
Changes for data/nomenclatures.php: 5 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -701,7 +701,7 @@ return [
            'CONSTRAINT_NAME'    => 'TBL_PLAFOND_STR_UN',
            'CUSTOM_CALCUL_PROC' => null,
            'ORDRE'              => 16,
            'FEUILLE_DE_ROUTE'   => false,
            'FEUILLE_DE_ROUTE'   => true,
        ],
        [
            'TBL_NAME'           => 'plafond_intervenant',
@@ -711,7 +711,7 @@ return [
            'CONSTRAINT_NAME'    => 'TBL_PLA_INT_UN',
            'CUSTOM_CALCUL_PROC' => null,
            'ORDRE'              => 17,
            'FEUILLE_DE_ROUTE'   => false,
            'FEUILLE_DE_ROUTE'   => true,
        ],
        [
            'TBL_NAME'           => 'plafond_element',
@@ -721,7 +721,7 @@ return [
            'CONSTRAINT_NAME'    => 'TBL_PLAFOND_ELEMENT_UN',
            'CUSTOM_CALCUL_PROC' => null,
            'ORDRE'              => 18,
            'FEUILLE_DE_ROUTE'   => false,
            'FEUILLE_DE_ROUTE'   => true,
        ],
        [
            'TBL_NAME'           => 'plafond_volume_horaire',
@@ -731,7 +731,7 @@ return [
            'CONSTRAINT_NAME'    => 'TBL_PLAFOND_VH_UN',
            'CUSTOM_CALCUL_PROC' => null,
            'ORDRE'              => 19,
            'FEUILLE_DE_ROUTE'   => false,
            'FEUILLE_DE_ROUTE'   => true,
        ],
        [
            'TBL_NAME'           => 'plafond_referentiel',
@@ -741,7 +741,7 @@ return [
            'CONSTRAINT_NAME'    => 'TBL_PLAFOND_REF_UN',
            'CUSTOM_CALCUL_PROC' => null,
            'ORDRE'              => 20,
            'FEUILLE_DE_ROUTE'   => false,
            'FEUILLE_DE_ROUTE'   => true,
        ],
    ],