1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mattermost_ynh.git synced 2024-09-03 19:36:29 +02:00

Update upgrade

This commit is contained in:
Éric Gaspar 2023-03-07 14:33:04 +01:00
parent c47854ac78
commit 3bb4b9c4c4

View file

@ -26,20 +26,20 @@ upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1
# ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1
# Backup the current version of the app
ynh_backup_before_upgrade
ynh_clean_setup () {
# Remove the PostgreSQL db in case of error during the migration.
if [ -n "$remove_psql_in_case_of_error" ]; then
ynh_psql_remove_db --db_user=$db_user --db_name=$db_name
fi
# Restore it if the upgrade fails
ynh_restore_upgradebackup
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
# # Backup the current version of the app
# ynh_backup_before_upgrade
# ynh_clean_setup () {
# # Remove the PostgreSQL db in case of error during the migration.
# if [ -n "$remove_psql_in_case_of_error" ]; then
# ynh_psql_remove_db --db_user=$db_user --db_name=$db_name
# fi
# # Restore it if the upgrade fails
# ynh_restore_upgradebackup
# }
# # Exit if an error occurs during the execution of the script
# ynh_abort_if_errors
#=================================================
# ENSURE DOWNWARD COMPATIBILITY