From 1058b8b04155fdb10af2458291fa5af66c094163 Mon Sep 17 00:00:00 2001 From: Sebastien Curt <sebastien.curt@tetras-libre.fr> Date: Wed, 13 Apr 2022 15:57:43 +0200 Subject: [PATCH] fix database migration script symfony 3 to 5 --- tools/migrations/migrate_from_symfony_3_to_5.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/migrations/migrate_from_symfony_3_to_5.sh b/tools/migrations/migrate_from_symfony_3_to_5.sh index a9899a0..ae079a5 100755 --- a/tools/migrations/migrate_from_symfony_3_to_5.sh +++ b/tools/migrations/migrate_from_symfony_3_to_5.sh @@ -48,9 +48,10 @@ docker-compose exec memorekall-member composer reload-db # Columns renaming in the form pattern/replacement/sedopts declare -A COLUMNS_REPLACEMENTS -COLUMNS_REPLACEMENTS[user]="roles,\(.*\)credential_expired/'[\"USER_ROLE\"]' as roles,\1credentials_expired as credential_expired/" +COLUMNS_REPLACEMENTS[user]="roles,\(.*\)credential_expired,\(.*\),locale/'[\"USER_ROLE\"]' as roles,\1credentials_expired as credential_expired,\2,'en' as locale/" # Old capsule table does not have a password field COLUMNS_REPLACEMENTS[capsule]='password/SUBSTRING(edition_link, -40) as password/' +COLUMNS_REPLACEMENTS[locale]="locale/'en' as locale" TABLES="user capsule editeur_capsule" echo "SET foreign_key_checks = 0;" > $$.sql -- GitLab