From e9ec4cb71dd7b3f583b9002b75373bce38441606 Mon Sep 17 00:00:00 2001 From: Limezy Date: Mon, 15 Nov 2021 09:47:03 +0700 Subject: [PATCH] Update change_url --- scripts/change_url | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/change_url b/scripts/change_url index 3b0077b..dbe016e 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -113,6 +113,16 @@ ynh_add_config --template="../conf/.env" --destination="$final_path/.env" chmod 400 "$final_path/.env" chown $app:$app "$final_path/.env" +#================================================= +# RUN DB MIGRATION +#================================================= +ynh_script_progression --message="Running DB initial migration..." --weight=3 + +pushd "$final_path" + ynh_use_nodejs + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn db:migrate +popd + #================================================= # GENERIC FINALISATION #=================================================