1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/outline_ynh.git synced 2024-09-03 19:56:12 +02:00
This commit is contained in:
Limezy 2021-11-12 01:14:18 +07:00
parent 47a7232d9d
commit 12770b3869
2 changed files with 2 additions and 12 deletions

View file

@ -134,7 +134,7 @@ ynh_script_progression --message="Creating a PostgreSQL database..." --time --we
db_name=$(ynh_sanitize_dbid --db_name=$app)
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
ynh_psql_test_if_first_run
ynh_psql_setup_db --db_user=$db_name --db_name=$db_name
ynh_psql_setup_db --db_user=$db_name --db_name=$db_name --db_pwd=$secret_key
ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS unaccent;" --database=$db_name
ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" --database=$db_name

View file

@ -101,19 +101,9 @@ ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ st
ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=6
ynh_psql_test_if_first_run
ynh_psql_setup_db --db_user=$db_name --db_name=$db_name
ynh_psql_setup_db --db_user=$db_name --db_name=$db_name --db_pwd=$secret_key
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
#=================================================