Loading doc/release-notes/v5.2.1.md +29 −1 Changes for doc/release-notes/v5.2.1.md: 29 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -16,4 +16,32 @@ git fetch --tags && git checkout --force 5.2.1 && bash ./install.sh ## 2. Dans la base de données Néant ```sql /** * Rattachement à une thèse destination de tout ce qui a été saisi sur une thèse source. */ create or replace function transfert_these(fromTheseId bigint, toTheseId bigint) returns void language plpgsql as $$ BEGIN -- select 'update '||rpad(table_name, 35)||' set '||column_name||' = toTheseId where '||column_name||' = fromTheseId ;' from information_schema.columns -- where column_name ilike '%these_id%' and -- table_name not ilike 'v\_%' and -- table_name not ilike 'src_%' and -- table_name not ilike 'tmp_%'; update soutenance_proposition set histo_destruction = now(), histo_destructeur_id = 1 where these_id = toTheseId; update attestation set these_id = toTheseId where these_id = fromTheseId; update diffusion set these_id = toTheseId where these_id = fromTheseId; update fichier_these set these_id = toTheseId where these_id = fromTheseId; update metadonnee_these set these_id = toTheseId where these_id = fromTheseId; update rapport set these_id = toTheseId where these_id = fromTheseId; update rdv_bu set these_id = toTheseId where these_id = fromTheseId; update soutenance_intervention set these_id = toTheseId where these_id = fromTheseId; update soutenance_proposition set these_id = toTheseId where these_id = fromTheseId; update validation set these_id = toTheseId where these_id = fromTheseId; END; $$; ``` Loading
doc/release-notes/v5.2.1.md +29 −1 Changes for doc/release-notes/v5.2.1.md: 29 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -16,4 +16,32 @@ git fetch --tags && git checkout --force 5.2.1 && bash ./install.sh ## 2. Dans la base de données Néant ```sql /** * Rattachement à une thèse destination de tout ce qui a été saisi sur une thèse source. */ create or replace function transfert_these(fromTheseId bigint, toTheseId bigint) returns void language plpgsql as $$ BEGIN -- select 'update '||rpad(table_name, 35)||' set '||column_name||' = toTheseId where '||column_name||' = fromTheseId ;' from information_schema.columns -- where column_name ilike '%these_id%' and -- table_name not ilike 'v\_%' and -- table_name not ilike 'src_%' and -- table_name not ilike 'tmp_%'; update soutenance_proposition set histo_destruction = now(), histo_destructeur_id = 1 where these_id = toTheseId; update attestation set these_id = toTheseId where these_id = fromTheseId; update diffusion set these_id = toTheseId where these_id = fromTheseId; update fichier_these set these_id = toTheseId where these_id = fromTheseId; update metadonnee_these set these_id = toTheseId where these_id = fromTheseId; update rapport set these_id = toTheseId where these_id = fromTheseId; update rdv_bu set these_id = toTheseId where these_id = fromTheseId; update soutenance_intervention set these_id = toTheseId where these_id = fromTheseId; update soutenance_proposition set these_id = toTheseId where these_id = fromTheseId; update validation set these_id = toTheseId where these_id = fromTheseId; END; $$; ```