From ab68a3a2eb7dc5272415c6ca3178832ee5cd7656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 11 Jan 2024 20:26:10 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 2df173b..90047ff 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -69,20 +69,20 @@ exec_occ() { # If we're moving through version 28.0.1~ynh2 (in which the switch to psql is made) if ynh_compare_current_package_version --comparison lt --version 28.0.1~ynh2 then - # Double-check the mysql DB is here + # Double-check the MySQL DB is here if ! mysql -e "USE $db_name" 2>/dev/null then - ynh_warn "Uhoh? The Nextcloud mysql DB doesn't exist ? We are supposed to move it to postgresql ... Maybe it was already migrated ?" - # Double check the psql is not empty, otherwise big whoops ? + ynh_warn "Uhoh? The Nextcloud MySQL DB doesn't exist? We are supposed to move it to PostgreSQL... Maybe it was already migrated?" + # Double check the psql is not empty, otherwise big whoops? if [[ "$(ynh_psql_execute_as_root --database=$db_name --sql="\dt" 2>/dev/null | wc -l)" == 0 ]] then - ynh_warn "Apparently the postgresql DB is not empty, so this is probably OK?" + ynh_warn "Apparently the PostgreSQL DB is not empty, so this is probably OK?" else - ynh_die "Apparently the postgresql DB is also empty, this is kind of worrying, what happened?!" + ynh_die "Apparently the PostgreSQL DB is also empty, this is kind of worrying, what happened?!" fi else ynh_print_info --message="Migrating to PostgreSQL database..." - exec_occ db:convert-type --all-apps --clear-schema pgsql $db_name 127.0.0.1 $db_name --password=$db_pwd -n + ynh_exec_warn_less exec_occ db:convert-type --all-apps --clear-schema pgsql $db_name 127.0.0.1 $db_name --password=$db_pwd -n ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name fi fi