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:
parent
ab207f2dd8
commit
42f0689725
1 changed files with 9 additions and 7 deletions
|
@ -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
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue