From: zdk Date: Tue, 7 Oct 2014 07:52:51 +0000 (+0700) Subject: FIX: Only create pg extension if it does not already exist X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7f4eef4c3d75ae4034d0cd176f0ab2b3c4d92fc2;p=discourse_docker.git FIX: Only create pg extension if it does not already exist --- diff --git a/templates/postgres.template.yml b/templates/postgres.template.yml index 565668a..990f6f8 100644 --- a/templates/postgres.template.yml +++ b/templates/postgres.template.yml @@ -166,8 +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 template1 -c "create extension if not exists hstore;"' + - exec: su postgres -c 'psql template1 -c "create extension if not exists 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;"'