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

Fix ** (Postgrex.Error) ERROR 42501 (insufficient_privilege): permission denied to create extension "citext"

This commit is contained in:
yalh76 2019-03-16 16:09:18 +01:00
parent d183380913
commit 759417b449

View file

@ -153,10 +153,14 @@ ynh_app_setting_set "$app" db_pwd "$db_pwd"
ynh_psql_test_if_first_run
ynh_psql_create_user "$app" "$db_pwd"
ynh_psql_execute_as_root "CREATE DATABASE $db_name ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' template=template0 OWNER $db_name;"
ynh_psql_execute_as_root "CREATE EXTENSION IF NOT EXISTS unaccent;" $db_name
ynh_psql_execute_as_root "CREATE EXTENSION IF NOT EXISTS pg_trgm;" $db_name
ynh_psql_execute_as_root "CREATE EXTENSION IF NOT EXISTS citext;" $db_name
ynh_psql_execute_as_root "CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";"$db_name
ynh_psql_execute_as_root "\connect $db_name
CREATE EXTENSION IF NOT EXISTS unaccent;"
ynh_psql_execute_as_root "\connect $db_name
CREATE EXTENSION IF NOT EXISTS pg_trgm;"
ynh_psql_execute_as_root "\connect $db_name
CREATE EXTENSION IF NOT EXISTS citext;"
ynh_psql_execute_as_root "\connect $db_name
CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE