Commit 5f88e02b authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Test MigrationStatutAutres.php plus simple

parent e0ad9d12
Loading
Loading
Loading
Loading
+1 −20
Original line number Diff line number Diff line
@@ -19,27 +19,8 @@ class MigrationStatutAutres extends AbstractMigration

    public function utile(): bool
    {
        $bdd = $this->manager->getBdd();

        $sqlStatutAutres = "
            SELECT *
            FROM statut_intervenant si 
            WHERE si.code = 'AUTRES'
        ";

        $statutAutres = current($bdd->select($sqlStatutAutres));
        //Si j'ai DOSSIER_ADRESSE alors je suis en V15
        if (isset($statutAutres['DOSSIER_ADRESSE'])) {
            //Alors je teste pour voir si pour le statut AUTRES aucun bloc de données perso est activé sinon je les désactive
            return ($statutAutres['DOSSIER_ADRESSE'] ||
                $statutAutres['DOSSIER_CONTACT'] ||
                $statutAutres['DOSSIER_IBAN'] ||
                $statutAutres['DOSSIER_IDENTITE_COMP'] ||
                $statutAutres['DOSSIER_INSEE']
            );
        }

        return false;
        return $this->manager->hasOld('table', 'DOSSIER');
    }