mirror of
https://github.com/YunoHost-Apps/wallabag2_ynh.git
synced 2024-10-01 13:35:06 +02:00
Only migrating db when upgrading from <2.4.0
This commit is contained in:
parent
e1d5c72ed5
commit
2b9decd65b
1 changed files with 6 additions and 4 deletions
|
@ -12,11 +12,13 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||
|
||||
# Migrate old (erroneous) database scheme (see: https://github.com/YunoHost-Apps/wallabag2_ynh/pull/125#issuecomment-1041426972)
|
||||
ynh_script_progression --message="Migrating old (pre-2018) database scheme..." --weight=11
|
||||
if ynh_compare_current_package_version --comparison lt --version 2.4; then
|
||||
# Migrate old (erroneous) database scheme (see: https://github.com/YunoHost-Apps/wallabag2_ynh/pull/125#issuecomment-1041426972)
|
||||
ynh_script_progression --message="Migrating old (pre-2018) database scheme..." --weight=11
|
||||
|
||||
ynh_exec_warn_less ynh_mysql_execute_file_as_root --database="$db_name" --file="../migrations/foreign-keys-removal.sql"
|
||||
ynh_script_progression --message="Database migration done. Resuming normal upgrade process" --weight=11
|
||||
ynh_exec_warn_less ynh_mysql_execute_file_as_root --database="$db_name" --file="../migrations/foreign-keys-removal.sql"
|
||||
ynh_script_progression --message="Database migration done. Resuming normal upgrade process" --weight=11
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
|
Loading…
Add table
Reference in a new issue