From 47a7232d9d1e9bd65043d0f229b3985062e6f5b9 Mon Sep 17 00:00:00 2001 From: Limezy Date: Fri, 12 Nov 2021 00:46:15 +0700 Subject: [PATCH] Update restore --- scripts/restore | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/restore b/scripts/restore index 6d768ad..df5aba0 100755 --- a/scripts/restore +++ b/scripts/restore @@ -104,6 +104,16 @@ ynh_psql_test_if_first_run ynh_psql_setup_db --db_user=$db_name --db_name=$db_name ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name +#================================================= +# RUN DB MIGRATION +#================================================= +ynh_script_progression --message="Running DB initial migration..." + +pushd "$final_path" + ynh_use_nodejs + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH yarn db:migrate +popd + #================================================= # RESTORE SYSTEMD #=================================================