Loading data/SQL/these.sql +28 −7 Changes for data/SQL/these.sql: 28 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -75,12 +75,33 @@ where d.id in ( ); /** * 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; $$; -- Rattachement à une thèse destination de tout ce qui est rattaché à une thèse source update rapport set these_id = 49033 where these_id = 28284; update attestation set these_id = 49033 where these_id = 28284; update DIFFUSION set these_id = 49033 where these_id = 28284; update fichier_these set these_id = 49033 where these_id = 28284; update METADONNEE_THESE set these_id = 49033 where these_id = 28284; update RDV_BU set these_id = 49033 where these_id = 28284; update VALIDATION set these_id = 49033 where these_id = 28284; select transfert_these(from_id, to_id) ; 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; $$; ``` module/Application/src/Application/Entity/Db/Financement.php +1 −0 Changes for module/Application/src/Application/Entity/Db/Financement.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Application\Entity\Db; use DateTime; use These\Entity\Db\These; use UnicaenApp\Entity\HistoriqueAwareTrait; use Application\Entity\Db\Source; Loading module/Application/src/Application/Entity/Db/Rapport.php +1 −0 Changes for module/Application/src/Application/Entity/Db/Rapport.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ use DateTime; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Fichier\Entity\Db\Fichier; use These\Entity\Db\These; use UnicaenApp\Entity\HistoriqueAwareInterface; use UnicaenApp\Entity\HistoriqueAwareTrait; use Laminas\Permissions\Acl\Resource\ResourceInterface; Loading module/Application/src/Application/Entity/Db/RdvBu.php +1 −0 Changes for module/Application/src/Application/Entity/Db/RdvBu.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Application\Entity\Db; use These\Entity\Db\These; use UnicaenApp\Entity\HistoriqueAwareInterface; use UnicaenApp\Entity\HistoriqueAwareTrait; Loading Loading
data/SQL/these.sql +28 −7 Changes for data/SQL/these.sql: 28 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -75,12 +75,33 @@ where d.id in ( ); /** * 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; $$; -- Rattachement à une thèse destination de tout ce qui est rattaché à une thèse source update rapport set these_id = 49033 where these_id = 28284; update attestation set these_id = 49033 where these_id = 28284; update DIFFUSION set these_id = 49033 where these_id = 28284; update fichier_these set these_id = 49033 where these_id = 28284; update METADONNEE_THESE set these_id = 49033 where these_id = 28284; update RDV_BU set these_id = 49033 where these_id = 28284; update VALIDATION set these_id = 49033 where these_id = 28284; select transfert_these(from_id, to_id) ;
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; $$; ```
module/Application/src/Application/Entity/Db/Financement.php +1 −0 Changes for module/Application/src/Application/Entity/Db/Financement.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ namespace Application\Entity\Db; use DateTime; use These\Entity\Db\These; use UnicaenApp\Entity\HistoriqueAwareTrait; use Application\Entity\Db\Source; Loading
module/Application/src/Application/Entity/Db/Rapport.php +1 −0 Changes for module/Application/src/Application/Entity/Db/Rapport.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ use DateTime; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Fichier\Entity\Db\Fichier; use These\Entity\Db\These; use UnicaenApp\Entity\HistoriqueAwareInterface; use UnicaenApp\Entity\HistoriqueAwareTrait; use Laminas\Permissions\Acl\Resource\ResourceInterface; Loading
module/Application/src/Application/Entity/Db/RdvBu.php +1 −0 Changes for module/Application/src/Application/Entity/Db/RdvBu.php: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ namespace Application\Entity\Db; use These\Entity\Db\These; use UnicaenApp\Entity\HistoriqueAwareInterface; use UnicaenApp\Entity\HistoriqueAwareTrait; Loading