Commit 46cdb255 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Release notes et SQL pour la future version 10.5.0

parent 8d7c628a
Loading
Loading
Loading
Loading
+95 −0
Original line number Diff line number Diff line

--
-- Indicateurs
--

alter table indicateur
    alter column requete type text using requete::text;

INSERT INTO indicateur (id, libelle, description, requete, actif, display_as, class)
select 100,
       'Thèses contenant des caractères interdits en XML',
       e'Thèses contenant des caractères qui poseront problème lors de la génération XML/TEF (préalable à l''envoi vers STEP-STAR)',
       e'with t(regexp, commentaire) as (
   values(''[^\\x0009\\x000A\\x000D\\x0020-\\xD7FF\\xE000-\\xFFFD\\x10000-\\x10FFFF]'', ''Expression régulière désignant tout caractère autre que ceux autorisés par XML 1.0'')
), tmp as (select these_id id,
                 th.source_code,
                 th.etablissement_id,
                 th.etat_these,
                 th.date_soutenance,
                 regexp_matches(mt.resume, t.regexp)               as resume,
                 regexp_matches(mt.resume_anglais, t.regexp)       as resume_anglais,
                 regexp_matches(mt.titre, t.regexp)                as titre,
                 regexp_matches(mt.titre_autre_langue, t.regexp)   as titre_autre_langue,
                 regexp_matches(mt.mots_cles_libres_fr, t.regexp)  as mots_cles_libres_fr,
                 regexp_matches(mt.mots_cles_libres_ang, t.regexp) as mots_cles_libres_ang,
                 regexp_matches(mt.mots_cles_rameau, t.regexp)     as mots_cles_rameau,
                 json_build_object(
                     ''resume'', regexp_matches(mt.resume, t.regexp),
                     ''resume_anglais'', regexp_matches(mt.resume_anglais, t.regexp),
                     ''titre'', regexp_matches(mt.titre, t.regexp),
                     ''titre_autre_langue'', regexp_matches(mt.titre_autre_langue, t.regexp),
                     ''mots_cles_libres_fr'', regexp_matches(mt.mots_cles_libres_fr, t.regexp),
                     ''mots_cles_libres_ang'', regexp_matches(mt.mots_cles_libres_ang, t.regexp),
                     ''mots_cles_rameau'', regexp_matches(mt.mots_cles_rameau, t.regexp)
                 ) extra
          from t,
               metadonnee_these mt,
               these th,
               etablissement etab
          where th.id = these_id and etab.id = th.etablissement_id)
select *
from tmp
where resume is not null
  or resume_anglais is not null
  or titre is not null
  or titre_autre_langue is not null
  or mots_cles_libres_fr is not null
  or mots_cles_libres_ang is not null
  or mots_cles_rameau is not null
order by id;',
       1,
       'THESE',
       'warning'
returning id;

create materialized view mv_indicateur_100 as
with t(regexp, commentaire) as (
    values('[^\x0009\x000A\x000D\x0020-\xD7FF\xE000-\xFFFD\x10000-\x10FFFF]', 'Expression régulière désignant tout caractère autre que ceux autorisés par XML 1.0')
), tmp as (select these_id id,
                  th.source_code,
                  th.etablissement_id,
                  th.etat_these,
                  th.date_soutenance,
                  regexp_matches(mt.resume, t.regexp)               as resume,
                  regexp_matches(mt.resume_anglais, t.regexp)       as resume_anglais,
                  regexp_matches(mt.titre, t.regexp)                as titre,
                  regexp_matches(mt.titre_autre_langue, t.regexp)   as titre_autre_langue,
                  regexp_matches(mt.mots_cles_libres_fr, t.regexp)  as mots_cles_libres_fr,
                  regexp_matches(mt.mots_cles_libres_ang, t.regexp) as mots_cles_libres_ang,
                  regexp_matches(mt.mots_cles_rameau, t.regexp)     as mots_cles_rameau,
                  json_build_object(
                          'resume', regexp_matches(mt.resume, t.regexp),
                          'resume_anglais', regexp_matches(mt.resume_anglais, t.regexp),
                          'titre', regexp_matches(mt.titre, t.regexp),
                          'titre_autre_langue', regexp_matches(mt.titre_autre_langue, t.regexp),
                          'mots_cles_libres_fr', regexp_matches(mt.mots_cles_libres_fr, t.regexp),
                          'mots_cles_libres_ang', regexp_matches(mt.mots_cles_libres_ang, t.regexp),
                          'mots_cles_rameau', regexp_matches(mt.mots_cles_rameau, t.regexp)
                  ) extra
           from t,
                metadonnee_these mt,
                these th,
                etablissement etab
           where th.id = these_id and etab.id = th.etablissement_id)
select *
from tmp
where resume is not null
   or resume_anglais is not null
   or titre is not null
   or titre_autre_langue is not null
   or mots_cles_libres_fr is not null
   or mots_cles_libres_ang is not null
   or mots_cles_rameau is not null
order by id;
+26 −0
Original line number Diff line number Diff line
Version 10.5.0
==============

Dans la base de données
-----------------------

Exécutez dans l'ordre les scripts SQL situés dans le répertoire portant le nom de la version en question.


Sur le serveur d'application
----------------------------

- Placez-vous dans le répertoire de l'application puis lancez la commande suivante
  pour installer la nouvelle version :

  ```bash
  git fetch --tags && git checkout --force 10.5.0 && bash ./install.sh
  ```

- Lancez la commande suivante pour vider le cache des attributions de privilèges aux rôles :

  ```bash
  $ vendor/bin/laminas privilege:clear-cache --key 'privileges_roles'
  ```

NB : Pas grave si le message "[ERROR] Aucune donnée dans le cache pour la clé 'privileges_roles' !" apparaît.