Skip to content
Snippets Groups Projects
Commit 4f44f7c2 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Docs de version

parent 0cca3108
No related branches found
No related tags found
No related merge requests found
Journal des modifications
=========================
1.3.2 (24/01/2020)
------------------
- Thèses : ajout des dates d'abandon et de transfert.
- Les dates d'insertion des données dans les tables `SYGAL_*` sont désormais retournées par le web service ;
cela permettra côté SyGAL de détecter un problème dans le CRONage du script de remplissage de ces tables).
1.3.1 (17/01/2020)
------------------
......
Version 1.3.2
=============
Sources PHP
-----------
Sur le serveur, placez-vous dans le répertoire du web service (sans doute `/var/www/sygal-import-ws`)
puis lancez les commandes suivantes pour installer la nouvelle version :
```bash
git fetch && git fetch --tags && git checkout --force 1.3.2 && bash install.sh
```
Selon le moteur PHP que vous avez installé, rechargez le service, exemple :
- php7.0-fpm : `service php7.0-fpm reload`
- apache2-mod-php7.0 : `service apache2 reload`
Base de données
---------------
### Dates d'abandon et de transfert des thèses
Il faut corriger la vue `V_SYGAL_THESE` ainsi que la table `SYGAL_THESE` pour inclure ces 2 dates.
#### Apogée
- Voici le nouveau script de la vue `V_SYGAL_THESE` :
```sql
create or replace view V_SYGAL_THESE as
with inscription_administrative as (
select distinct
ths.cod_ind,
iae.cod_dip,
iae.cod_vrs_vdi
from these_hdr_sout ths
join ins_adm_etp iae on iae.cod_ind = ths.cod_ind and ( iae.cod_dip, iae.cod_vrs_vdi ) in ( ( ths.cod_dip, ths.cod_vrs_vdi ), ( ths.cod_dip_anc, ths.cod_vrs_vdi_anc ) )
join diplome dip on dip.cod_dip = iae.cod_dip
join typ_diplome tpd on tpd.cod_tpd_etb = dip.cod_tpd_etb
where ths.cod_ths_trv = '1' -- Exclusion des travaux
and iae.eta_iae = 'E' -- Inscription administrative non annulee
and iae.eta_pmt_iae = 'P' -- Inscription administrative payee
and dip.cod_tpd_etb in ( '39', '40' )
and tpd.eta_ths_hdr_drt = 'T' -- Inscription en these
and tpd.tem_sante = 'N' -- Exclusion des theses d exercice
),
hierarchie_structures as (
select
cod_cmp_inf,
cod_cmp_sup
from cmp_cmp
where connect_by_isleaf = 1
connect by prior cod_cmp_sup = cod_cmp_inf
),
ancienne_these as (
select distinct
cod_ind,
cod_dip_anc,
cod_vrs_vdi_anc,
'A' eta_ths
from these_hdr_sout
where cod_ths_trv = '1'
and cod_dip_anc is not null
)
select
'apogee' as source_id, -- Id de la source
---------- Enregistrement de la these --------
ths.cod_ths as id, -- Identifiant de la these
case when ths.eta_ths = 'S' and nvl ( ths.dat_sou_ths, sysdate + 1 ) > sysdate
then 'E' else ths.eta_ths end eta_ths, -- Etat de la these (E=En cours, A=Abandonnee, S=Soutenue, U=Transferee)
ind.cod_etu as doctorant_id, -- Identifiant du doctorant
ths.cod_dis, -- Code discipline
dis.lib_int1_dis, -- Libellé discipline
ths.lib_ths, -- Titre de la these
ths.cod_lng, -- Code langue etrangere du titre
ths.dat_deb_ths, -- Date de 1ere inscription
ths.dat_abandon, -- Date d'abandon
ths.dat_transfert_dep, -- Date de transfert
edo.cod_nat_edo as ecole_doct_id, -- Identifiant de l'ecole doctorale
ths.cod_eqr as unite_rech_id, -- Identifiant de l'unité de recherche principale
----------- Cotutelle ----------
pay.lib_pay, -- Denomination pays de cotutelle
nvl ( etb.lib_web_etb, etb.lib_etb ) lib_etb_cot, -- Denomination etablissement de cotutelle
ths.tem_avenant, -- Avenant a la convention de cotutelle (O/N)
------- Organisation de la soutenance ------
ths.dat_prev_sou, -- Date previsionnelle de soutenance
ths.tem_sou_aut_ths, -- Soutenance autorisee (O/N/null)
ths.dat_aut_sou_ths, -- Date d autorisation de soutenance
ths.dat_sou_ths, -- Date de soutenance de la these
---------- Confidentialite --------
ths.dat_fin_cfd_ths, -- Date de fin de confidentialite de la these
---------- Jury et resultats --------
tre.cod_neg_tre, -- Resultat positif (1) ou non (0)
ths.eta_rpd_ths, -- Reproduction de la these ( O=Oui / C=Oui avec corrections / N=Non )
decode(ths.eta_rpd_ths,
'N', 'obligatoire',
'C', 'facultative',
null) as correction_possible -- Témoin de corrections attendues
from inscription_administrative iae
join individu ind on ind.cod_ind = iae.cod_ind
join version_diplome vdi on vdi.cod_dip = iae.cod_dip and vdi.cod_vrs_vdi = iae.cod_vrs_vdi
join these_hdr_sout ths on ths.cod_ind = iae.cod_ind and ths.cod_dip = iae.cod_dip and ths.cod_vrs_vdi = iae.cod_vrs_vdi
left join ancienne_these anc on anc.cod_ind = ths.cod_ind and anc.cod_dip_anc = ths.cod_dip and anc.cod_vrs_vdi_anc = ths.cod_vrs_vdi and anc.eta_ths = ths.eta_ths
left join annee_uni ans on ans.cod_anu = ths.daa_fin_ths
left join ecole_doctorale edo on edo.cod_edo = ths.cod_edo
left join secteur_rch ser on ser.cod_ser = ths.cod_ser
left join equipe_rch eqr on eqr.cod_eqr = ths.cod_eqr
left join resultat_vdi rvi on rvi.cod_ind = iae.cod_ind and rvi.cod_dip = iae.cod_dip and rvi.cod_vrs_vdi = iae.cod_vrs_vdi and rvi.cod_ses = '0' and rvi.cod_adm = '1' and rvi.cod_tre is not null
left join annee_uni anr on anr.cod_anu = rvi.cod_anu
left join typ_resultat tre on tre.cod_tre = rvi.cod_tre
left join mention men on men.cod_men = rvi.cod_men
left join hierarchie_structures ccm on ccm.cod_cmp_inf = ths.cod_cmp
left join composante cmp on cmp.cod_cmp = nvl ( ccm.cod_cmp_sup, ths.cod_cmp )
left join diplome_sise dis on dis.cod_dis = ths.cod_dis
left join etablissement etb on etb.cod_etb = ths.cod_etb
left join pays pay on pay.cod_pay = ths.cod_pay
left join etablissement sou on sou.cod_etb = ths.cod_etb_sou
left join etablissement ori on ori.cod_etb = ths.cod_etb_origine
left join langue lng on lng.cod_lng = ths.cod_lng
where
ths.cod_ths_trv = '1' and -- Exclusion des travaux
anc.cod_dip_anc is null
/
```
- Et voici de quoi mettre à jour la table `SYGAL_THESE` :
```sql
alter table SYGAL_THESE add DAT_ABANDON DATE
/
alter table SYGAL_THESE add DAT_TRANSFERT_DEP DATE
/
```
#### Physalis
- Concernant la vue `V_SYGAL_THESE`, les colonnes à ajouter doivent se nommer `DAT_ABANDON` et `DAT_TRANSFERT_DEP`.
- Et voici de quoi mettre à jour la table `SYGAL_THESE` :
```sql
alter table SYGAL_THESE add DAT_ABANDON DATE
/
alter table SYGAL_THESE add DAT_TRANSFERT_DEP DATE
/
```
### Renommage de colonne dans les tables `SYGAL_*`
#### Apogée
```sql
ALTER TABLE SYGAL_ACTEUR RENAME COLUMN INSERTED_ON TO SOURCE_INSERT_DATE ;
ALTER TABLE SYGAL_DOCTORANT RENAME COLUMN INSERTED_ON TO SOURCE_INSERT_DATE ;
ALTER TABLE SYGAL_ECOLE_DOCT RENAME COLUMN INSERTED_ON TO SOURCE_INSERT_DATE ;
ALTER TABLE SYGAL_ETABLISSEMENT RENAME COLUMN INSERTED_ON TO SOURCE_INSERT_DATE ;
ALTER TABLE SYGAL_FINANCEMENT RENAME COLUMN INSERTED_ON TO SOURCE_INSERT_DATE ;
ALTER TABLE SYGAL_INDIVIDU RENAME COLUMN INSERTED_ON TO SOURCE_INSERT_DATE ;
ALTER TABLE SYGAL_ORIGINE_FINANCEMENT RENAME COLUMN INSERTED_ON TO SOURCE_INSERT_DATE ;
ALTER TABLE SYGAL_ROLE RENAME COLUMN INSERTED_ON TO SOURCE_INSERT_DATE ;
ALTER TABLE SYGAL_STRUCTURE RENAME COLUMN INSERTED_ON TO SOURCE_INSERT_DATE ;
ALTER TABLE SYGAL_THESE RENAME COLUMN INSERTED_ON TO SOURCE_INSERT_DATE ;
ALTER TABLE SYGAL_THESE_ANNEE_UNIV RENAME COLUMN INSERTED_ON TO SOURCE_INSERT_DATE ;
ALTER TABLE SYGAL_TITRE_ACCES RENAME COLUMN INSERTED_ON TO SOURCE_INSERT_DATE ;
ALTER TABLE SYGAL_UNITE_RECH RENAME COLUMN INSERTED_ON TO SOURCE_INSERT_DATE ;
ALTER TABLE SYGAL_VARIABLE RENAME COLUMN INSERTED_ON TO SOURCE_INSERT_DATE ;
```
#### Physalis
Idem.
Serveur
-------
- Lancer le script de mise à jour de la table `SYGAL_THESE` à partir de la vue `V_SYGAL_THESE`.
Exemple :
```bash
APP_DIR=/var/www/sygal-import-ws
/usr/bin/php ${APP_DIR}/public/index.php update-service-tables
```
- Vérifiez que le contenu de la table `SYGAL_THESE` a bien été mis à jour à l'instant.
Exemple :
```sql
select inserted_on from SYGAL_THESE where rownum = 1;
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment