From 6c9e3ab78dc0592952067e67355350f7c128d85a Mon Sep 17 00:00:00 2001 From: orhtej2 <2871798+orhtej2@users.noreply.github.com> Date: Wed, 22 Nov 2023 23:27:39 +0100 Subject: [PATCH] Actually fix 1.6.5~ynh1 upgrade. --- scripts/upgrade | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/upgrade b/scripts/upgrade index be1f8eb..8743ae1 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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 #=================================================