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

Augmentation de taille du stockage du n° INSEE.

Amélioration du script de migration
parent 73224d24
Loading
Loading
Loading
Loading
+12
Changes for admin/migration/IndexesContraintesDoublons.php: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@ class IndexesContraintesDoublons extends AbstractMigration

    public function utile(): bool
    {
        return true;

        return $this->manager->hasOld('index', 'CORPS_SRC_UN')
            && $this->manager->hasOld('index', 'TBL_AGR_INTERVENANT_FK_IDX');
    }
@@ -62,6 +64,16 @@ class IndexesContraintesDoublons extends AbstractMigration
        $bdd->index()->drop('TBL_NOEUD_NETAPE_IDX');
        $bdd->index()->drop('TBL_NOEUD_NOEUD_IDX');
        $bdd->index()->drop('TBL_NOEUD_STRUCTURE_IDX');

        $bdd->exec('UPDATE INTERVENANT SET NUMERO_INSEE_PROVISOIRE = 0 WHERE NUMERO_INSEE_PROVISOIRE IS NULL');
        $bdd->exec('DELETE FROM type_intervention_ep WHERE id IN (
          SELECT max(id) 
          FROM type_intervention_ep 
          WHERE histo_destruction IS NOT NULL
          GROUP BY source_code, histo_destruction 
          HAVING count(*) > 1
          )'
        );
    }


+1 −1
Changes for data/ddl/table/INTERVENANT.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -469,7 +469,7 @@ return [
            'name'        => 'NUMERO_INSEE',
            'type'        => 'string',
            'bdd-type'    => 'VARCHAR2',
            'length'      => 15,
            'length'      => 20,
            'scale'       => NULL,
            'precision'   => NULL,
            'nullable'    => TRUE,
+1 −1
Changes for data/ddl/table/INTERVENANT_DOSSIER.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -409,7 +409,7 @@ return [
            'name'        => 'NUMERO_INSEE',
            'type'        => 'string',
            'bdd-type'    => 'VARCHAR2',
            'length'      => 15,
            'length'      => 20,
            'scale'       => NULL,
            'precision'   => NULL,
            'nullable'    => TRUE,