1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/castopod_ynh.git synced 2024-09-03 18:16:14 +02:00

Merge pull request #115 from YunoHost-Apps/fix_install

Actually fix 1.6.5~ynh1 upgrade.
This commit is contained in:
Mateusz 2023-11-23 00:27:36 +01:00 committed by GitHub
commit eadcf34728
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,6 +54,8 @@ if ynh_compare_current_package_version --comparison le --version "1.1.2~ynh2"; t
ynh_script_progression --message="Fixing migrations..." --weight=1
# this will fail is `cp-install` was not run on prev version - just ignore, DB schema is (re)generated later.
ynh_mysql_execute_as_root --database=$db_name --sql="UPDATE cp_migrations SET class='Media\\\\Database\\\\Migrations\\\\AddMedia', namespace='Media' where class='App\\\\Database\\\\Migrations\\\\AddMedia'" || true
elif ynh_compare_current_package_version --comparison lt --version "1.6.5~ynh2"; then
chown -R $app:www-data $data_dir
fi
#=================================================