From dcb258b2c052ff5726df9eab9b5f29f8df148284 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 3 Jan 2019 12:22:40 +0100 Subject: [PATCH] Solve issue during install ** (Postgrex.Error) ERROR 42501 (insufficient_privilege): permission denied to create extension "uuid-ossp" --- scripts/install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install b/scripts/install index 72cdb31..db2b8c7 100755 --- a/scripts/install +++ b/scripts/install @@ -117,6 +117,8 @@ ynh_app_setting_set "$app" psqlpwd "$db_pwd" ynh_psql_test_if_first_run ynh_psql_create_user "$app" "$db_pwd" ynh_psql_execute_as_root \ +"ALTER USER $app WITH SUPERUSER;" +ynh_psql_execute_as_root \ "CREATE DATABASE $db_name ENCODING 'UTF8' LC_COLLATE='C' LC_CTYPE='C' template=template0 OWNER $app;" ynh_psql_execute_as_root "\connect $db_name CREATE EXTENSION IF NOT EXISTS unaccent;CREATE EXTENSION IF NOT EXISTS pg_trgm;"