From 2cac1e10d94bebfd9c6b5e40f09525bcef6057de Mon Sep 17 00:00:00 2001 From: zdk Date: Fri, 3 Oct 2014 18:17:10 +0700 Subject: [PATCH] FIX: Install pg extention in the template1 database to avoid giving user superuser permissions, so db:migrate won't be failed. --- templates/postgres.template.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/postgres.template.yml b/templates/postgres.template.yml index a54d672..565668a 100644 --- a/templates/postgres.template.yml +++ b/templates/postgres.template.yml @@ -166,6 +166,8 @@ run: - exec: su postgres -c 'psql discourse -c "create user discourse;"' || true - exec: su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true - exec: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' + - exec: su postgres -c 'psql template1 -c "create extension hstore;"' + - exec: su postgres -c 'psql template1 -c "create extension pg_trgm;"' - exec: su postgres -c 'psql discourse -c "create extension if not exists hstore;"' - exec: su postgres -c 'psql discourse -c "create extension if not exists pg_trgm;"' -- 2.25.1