From eb431ce80233238bb1f68ab469ff5f26fe64ac4b Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 22 Mar 2022 23:31:26 +0100 Subject: [PATCH] missing db_prefix during upgrade --- scripts/upgrade | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index baa2c71..7cc1c94 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,6 +23,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) +db_prefix=$(ynh_app_setting_get --app=$app --key=db_prefix) #================================================= # CHECK VERSION @@ -52,6 +53,12 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Ensuring downward compatibility..." +# If db_prefix doesn't exist, create it +if [ -z "$db_prefix" ]; then + db_prefix="" + ynh_app_setting_set --app=$app --key=db_prefix --value=$db_prefix +fi + #================================================= # CREATE DEDICATED USER #=================================================