1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

Update upgrade

This commit is contained in:
ericgaspar 2024-01-12 07:15:43 +01:00
parent 7394835d4c
commit c39600e756

View file

@ -72,11 +72,11 @@ then
# Double-check the MySQL DB is here # Double-check the MySQL DB is here
if ! mysql -e "USE $db_name" 2>/dev/null if ! mysql -e "USE $db_name" 2>/dev/null
then then
ynh_warn "Uhoh? The Nextcloud MySQL DB doesn't exist? We are supposed to move it to PostgreSQL... Maybe it was already migrated?" ynh_print_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? # 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 ]] if [[ "$(ynh_psql_execute_as_root --database=$db_name --sql="\dt" 2>/dev/null | wc -l)" == 0 ]]
then then
ynh_warn "Apparently the PostgreSQL DB is not empty, so this is probably OK?" ynh_print_warn "Apparently the PostgreSQL DB is not empty, so this is probably OK?"
else 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 fi