1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wikijs_ynh.git synced 2024-09-03 20:36:09 +02:00

Adding pg_trgm

This commit is contained in:
yalh76 2020-01-28 00:45:37 +01:00
parent 43231ee0d0
commit c135e5a816
3 changed files with 6 additions and 0 deletions

View file

@ -87,6 +87,7 @@ ynh_app_setting_set --app=$app --key=db_name --value=$db_name
ynh_app_setting_set --app=$app --key=db_pwd --value=$db_pwd
ynh_psql_test_if_first_run
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" --database=$db_name
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE

View file

@ -95,6 +95,7 @@ ynh_print_info --message="Restoring the PostgreSQL database..."
ynh_psql_test_if_first_run
ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" --database=$db_name
ynh_psql_execute_file_as_root --file="./db.sql" --database="$db_name"
#=================================================

View file

@ -79,6 +79,10 @@ ynh_secure_remove --file="/var/log/$app/"
# Create PostgreSQL User
ynh_psql_create_user $db_name $db_pwd
# Install pg_trgm extension to provide a PostgreSQL search solution
ynh_psql_test_if_first_run
ynh_psql_execute_as_root --sql="CREATE EXTENSION IF NOT EXISTS pg_trgm;" --database=$db_name
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================