diff --git a/scripts/upgrade b/scripts/upgrade index 4ab944a..25463b7 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -72,13 +72,6 @@ ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" -#================================================= -# CONFIGURE CASTOPOD DATABASE -#================================================= -ynh_script_progression --message="Configuring Castopod database..." --weight=1 - -ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < "../conf/v1.5.2.sql" - #================================================= # ADD CONFIGURE #================================================= @@ -88,6 +81,15 @@ ynh_add_config --template="../conf/.env.example" --destination="$install_dir/.en chmod 600 $install_dir/.env chown $app:www-data "$install_dir/.env" +#================================================= +# CONFIGURE CASTOPOD DATABASE +#================================================= +ynh_script_progression --message="Configuring Castopod database..." --weight=1 + +pushd $install_dir + sudo -u $app php${phpversion} spark migrate --all +popd + #================================================= # END OF SCRIPT #=================================================