Commit 4d3ad622 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Utilisatio de statut ou de statut_intervenant, selon l'état de la BDD

parent 59a0fef6
Loading
Loading
Loading
Loading
+5 −3
Changes for admin/migration/v18Divers.php: 5 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -110,6 +110,8 @@ class v18Divers extends AbstractMigration

        if (!$need) return true;

        $statutTable = $this->manager->hasTable('STATUT') ? 'STATUT' : 'STATUT_INTERVENANT';

        $sql = "SELECT
          COALESCE(t1.annee, t2.annee, t3.annee) annee,
          COALESCE(t1.nom, t2.nom, t3.nom) nom,
@@ -129,7 +131,7 @@ class v18Divers extends AbstractMigration
              count(*) c
            FROM
              intervenant i
              JOIN statut si ON si.id = i.statut_id
              JOIN $statutTable si ON si.id = i.statut_id
            WHERE
              i.HISTO_DESTRUCTION IS NULL
            GROUP BY
@@ -153,7 +155,7 @@ class v18Divers extends AbstractMigration
              count(*) c
            FROM
              intervenant i
              JOIN statut si ON si.id = i.statut_id
              JOIN $statutTable si ON si.id = i.statut_id
            WHERE
              i.HISTO_DESTRUCTION IS NULL
            GROUP BY
@@ -176,7 +178,7 @@ class v18Divers extends AbstractMigration
              count(*) c
            FROM
              intervenant i
              JOIN statut si ON si.id = i.statut_id
              JOIN $statutTable si ON si.id = i.statut_id
            WHERE
              i.HISTO_DESTRUCTION IS NULL
              AND i.UTILISATEUR_CODE IS NOT NULL