Commit 7e165d33 authored by Julien BOUYER's avatar Julien BOUYER
Browse files

UNOTOPLYS-267 feat : migration des conditions et des expressions

parent 39836800
-- UNOTOPLYS-267 : migration des conditions et des expressions pour séparer la reference de la question et la valeur de la réponse par un double underscore
-- migration des conditions dans les items des screens
update screen set items = replace(items::TEXT, 'answers[projet_orientation_souhait_parcours_', 'answers[projet_orientation_souhait_parcours__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[projet_orientation_projet_pro_', 'answers[projet_orientation_projet_pro__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[projet_orientation_connaissance_filiere_', 'answers[projet_orientation_connaissance_filiere__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[projet_orientation_connaissance_sectorisation_', 'answers[projet_orientation_connaissance_sectorisation__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[projet_orientation_reorientation_', 'answers[projet_orientation_reorientation__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[profil_scol_type_bac_', 'answers[profil_scol_type_bac__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[profil_scol_moy_gen_', 'answers[profil_scol_moy_gen__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[niveau_scient_moy_scient_', 'answers[niveau_scient_moy_scient__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[niveau_scient_moy_phychim_', 'answers[niveau_scient_moy_phychim__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[niveau_scient_moy_bio_', 'answers[niveau_scient_moy_bio__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[niveau_litt_moy_francais_', 'answers[niveau_litt_moy_francais__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[niveau_litt_moy_histgeo_', 'answers[niveau_litt_moy_histgeo__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[niveau_litt_moy_philo_', 'answers[niveau_litt_moy_philo__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[spes_bac_g_scient4_', 'answers[spes_bac_g_scient4__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[spes_bac_g_scient6_', 'answers[spes_bac_g_scient6__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[spes_bac_t_serie_bac_', 'answers[spes_bac_t_serie_bac__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[methodes_travail_hebdo_', 'answers[methodes_travail_hebdo__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[methodes_autonomie_', 'answers[methodes_autonomie__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[niveau_sportif_moy_eps_', 'answers[niveau_sportif_moy_eps__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[niveau_sportif_sports_maitrises_', 'answers[niveau_sportif_sports_maitrises__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[niveau_sportif_sport_hebdo_', 'answers[niveau_sportif_sport_hebdo__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[autres_competences_diplomes_', 'answers[autres_competences_diplomes__')::jsonb;
update screen set items = replace(items::TEXT, 'answers[autres_competences_experiences_', 'answers[autres_competences_experiences__')::jsonb;
-- migration des expressions des variables
update variable set expression = replace(expression, 'answers[profil_scol_type_bac_', 'answers[profil_scol_type_bac__');
update variable set expression = replace(expression, 'answers[spes_bac_t_serie_bac_', 'answers[spes_bac_t_serie_bac__');
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
<include file="config/liquibase/changelog/20210427153800_migration_workspace.sql" relativeToChangelogFile="false"/> <include file="config/liquibase/changelog/20210427153800_migration_workspace.sql" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20210428172600_migration_droit.sql" relativeToChangelogFile="false"/> <include file="config/liquibase/changelog/20210428172600_migration_droit.sql" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20210603140000_ajout_type_variable.sql" relativeToChangelogFile="false"/> <include file="config/liquibase/changelog/20210603140000_ajout_type_variable.sql" relativeToChangelogFile="false"/>
<include file="config/liquibase/changelog/20210621104900_migration_conditions.sql" relativeToChangelogFile="false"/>
<!-- jhipster-needle-liquibase-add-constraints-changelog - JHipster will add liquibase constraints changelogs here --> <!-- jhipster-needle-liquibase-add-constraints-changelog - JHipster will add liquibase constraints changelogs here -->
<!-- jhipster-needle-liquibase-add-incremental-changelog - JHipster will add incremental liquibase changelogs here --> <!-- jhipster-needle-liquibase-add-incremental-changelog - JHipster will add incremental liquibase changelogs here -->
</databaseChangeLog> </databaseChangeLog>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment