From 968d650248335ff5fc7de9b09efcb9616ae59ee7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 23 Oct 2023 23:41:17 +0200 Subject: [PATCH] fix database --- scripts/install | 9 +++++++++ scripts/upgrade | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/scripts/install b/scripts/install index a688986..b27e8a2 100755 --- a/scripts/install +++ b/scripts/install @@ -64,6 +64,15 @@ ynh_add_config --template="../conf/.env.example" --destination="$install_dir/.en chmod 600 $install_dir/.env chown $app:www-data "$install_dir/.env" +#================================================= +# RUN MIGRATIONS +#================================================= +ynh_script_progression --message="Configuring $app database..." --weight=1 + +pushd $install_dir + ynh_exec_warn_less ynh_exec_as php${phpversion} spark migrate --all +popd + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 6471820..1c0d283 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -81,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" +#================================================= +# RUN MIGRATIONS +#================================================= +ynh_script_progression --message="Configuring $app database..." --weight=1 + +pushd $install_dir + ynh_exec_warn_less ynh_exec_as php${phpversion} spark migrate --all +popd + #================================================= # END OF SCRIPT #=================================================