From 5d991034de7bf4267dfb7eda8869e6bc217faed8 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Tue, 16 Jan 2024 02:09:32 +0100 Subject: [PATCH] Update upgrade: fix check that postgresql is empty during mysql->psql migration --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index b008d8d..b86b4a6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -76,9 +76,9 @@ then # 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_print_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?!" + else + ynh_print_warn "Apparently the PostgreSQL DB is not empty, so this is probably OK?" fi else ynh_print_info --message="Migrating to PostgreSQL database..."