Commit 6ad701d6 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Merge branches 'develop' and 'zf3' of https://git.unicaen.fr/open-source/OSE into zf3

parents a106bf9e 90b75186
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -15,10 +15,12 @@ author: Laurent Lécluse - DSI - Unicaen
* Depuis quelques temps, les plafonds bloquants fonctionnaient comme des plafonds informatifs. C'est corrigé.
* La séquence FORMULE_RESULTAT_SERVIC_ID_SEQ se met maintenant correctement à jour (avant, cela entrainait de nombreux bugs, car la formule des HC ne se calculait plus après une mise à jour)
* L'indicateur 120 renvoyait à tort le même résultat que le 110.
* Lors de la modification d'un privilège, le cache se met à jour automatiquement désormais

## Nouveautés

* Ajout d'un nouveau contrôle lors des demandes de mise en paiement : il n'est plus possible de payer plus d'heures que d'HETD même si des HETD ont déjà été payées à tort
* La vue matérialisée MV_EXT_SERVVICE a été créée pour être exploitée pour alimenter des outils de pilotage (BO, etc).

# OSE 8.2.2

+2 −1
Original line number Diff line number Diff line
@@ -2,3 +2,4 @@

$job = $c->getArg(2);
$oa->exec('UnicaenImport SyncJob ' . $job);
$c->println("Opération terminée");
 No newline at end of file
+56 −16
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ class DdlTable extends DdlAbstract
                c.data_precision   \"precision\",
                c.nullable         \"nullable\",
                c.data_default     \"default\",
                ccomm.comments     \"col_commentaire\",
            " : '') . "
            comm.comments     \"commentaire\",
            s.sequence_name   \"sequence\"
@@ -119,7 +120,7 @@ class DdlTable extends DdlAbstract
            LEFT JOIN user_mviews          m ON m.mview_name = t.table_name
            LEFT JOIN user_tab_comments comm ON comm.table_name = t.table_name
            LEFT JOIN user_sequences       s ON s.sequence_name = SUBSTR(t.table_name,1,23) || '_ID_SEQ'
            " . ($withColumns ? "JOIN user_tab_cols c ON c.table_name = t.table_name " : '') . "
            " . ($withColumns ? "JOIN user_tab_cols c ON c.table_name = t.table_name LEFT JOIN user_col_comments ccomm ON ccomm.table_name = c.table_name AND ccomm.column_name = c.column_name" : '') . "
          WHERE
            m.mview_name IS NULL 
            " . ($this->hasOption(self::OPT_NO_TEMPORARY) ? "AND t.temporary <> 'Y'" : '') . "
@@ -160,6 +161,7 @@ class DdlTable extends DdlAbstract
                    'precision'   => $paq['precision'] ? (int)$paq['precision'] : null,
                    'nullable'    => $paq['nullable'] == 'Y',
                    'default'     => $default,
                    'commentaire' => $paq['col_commentaire'],
                ];
            }
        }
@@ -237,10 +239,18 @@ class DdlTable extends DdlAbstract

    public function create(array $data)
    {
        /* Création de la table */
        $this->addQuery($this->makeCreate($data), 'Ajout de la table '.$data['name']);

        /* Création du commentaire éventuel de la table */
        if ($comm = $this->makeCreateComm($data)) {
            $this->addQuery($comm, 'Ajout de commentaire sur la table ' . $data['name']);
        }

        /* Création des commentaires éventuels de colonnes */
        foreach($data['columns'] as $column){
            $this->alterColumnComment($data['name'], ['commentaire' => null], $column);
        }
    }


@@ -297,7 +307,8 @@ END;';
    {
        return $this->isColDiffType($col1, $col2)
            || $this->isColDiffDefault($col1, $col2)
            || $this->isColDiffNullable($col1, $col2);
            || $this->isColDiffNullable($col1, $col2)
            || $this->isColDiffComment($col1, $col2);
    }


@@ -326,6 +337,13 @@ END;';



    private function isColDiffComment(array $col1, array $col2)
    {
        return $col1['commentaire'] !== $col2['commentaire'];
    }



    public function alter(array $old, array $new)
    {
        if ($this->isDiff($old, $new)) {
@@ -350,6 +368,7 @@ END;';
                $this->alterColumnType($name, $cOld, $cNew);
                $this->alterColumnNullable($name, $cOld, $cNew);
                $this->alterColumnDefault($name, $cOld, $cNew);
                $this->alterColumnComment($name, $cOld, $cNew);
            }

            if (!(isset($new['options']['noDropColumns']) && $new['options']['noDropColumns'])) {
@@ -379,6 +398,9 @@ END;';

        $sql = "ALTER TABLE \"$table\" ADD (" . implode(" ", $cp) . ")";
        $this->addQuery($sql, 'Ajout de la colonne '.$column['name'].' sur la table '.$table);

        /* Ajout du commentaire éventuel de la conne */
        $this->alterColumnComment($table, ['commentaire' => null], $column);
    }


@@ -429,6 +451,24 @@ END;';



    private function alterColumnComment(string $table, array $old, array $new)
    {
        $column = $new['name'];
        if ($this->isColDiffComment($old, $new)) {
            $commentaire = $new['commentaire'];
            if ($commentaire){
                $commentaire = "'" . str_replace("'", "''", $commentaire) . "'";
                $sql = "COMMENT ON COLUMN \"$table\".\"$column\" IS $commentaire";
                $this->addQuery($sql,'Modification du commentaire de la colonne '.$column.' de la table '.$table);
            }else{
                $sql = "COMMENT ON COLUMN \"$table\".\"$column\" IS ''";
                $this->addQuery($sql,'Suppression du commentaire de la colonne '.$column.' de la table '.$table);
            }
        }
    }



    public function rename(string $oldName, array $new)
    {
        $newName = $new['name'];
+1 −0
Original line number Diff line number Diff line
@@ -82,6 +82,7 @@ class DataGen
            'table'   => 'WF_ETAPE',
            'context' => ['install', 'update'],
            'key'     => 'CODE',
            'options' => ['update-ignore-cols' => ['LIBELLE_INTERVENANT', 'LIBELLE_AUTRES']],
        ],
        [
            'table'   => 'TYPE_AGREMENT',
+1757 −374

File changed.

Preview size limit exceeded, changes collapsed.

Loading