1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hubzilla_ynh.git synced 2024-09-03 19:26:21 +02:00

Update upgrade

This commit is contained in:
Éric Gaspar 2024-01-12 23:26:54 +01:00
parent ab207f2dd8
commit 42f0689725

View file

@ -53,13 +53,15 @@ if [ -z "${fpm_usage:-}" ]; then
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
fi
# Switch $database to "mysql" or "postgresql"
if [[ $database == "1" ]] 2>/dev/null; then
database="mysql"
ynh_app_setting_set --app=$app --key=database --value=$database
elif [[ $database == "2" ]] 2>/dev/null; then
database="postgresql"
ynh_app_setting_set --app=$app --key=database --value=$database
#=================================================
# MIGRATING DATABASE
#=================================================
# Check if using MariaDB
# This migration should be done before the upgrade
if mysqlshow | grep -q "^| $db_name "; then
remove_psql_in_case_of_error=1
mariadb-to-pg
fi
#=================================================