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: fix check that postgresql is empty during mysql->psql migration

This commit is contained in:
Alexandre Aubin 2024-01-16 02:09:32 +01:00 committed by GitHub
parent ecc4497b19
commit 5d991034de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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..."