Commit b7166b9e by Kirill Smelkov

gitlab/gitlab-unicorn-startup: Make sure pg_trgm extension is enabled for gitlab db

Starting from GitLab 8.6 pg_trgm extension becomes hard dependency of
gitlab.

    https://gitlab.com/gitlab-org/gitlab-ce/commit/d24ee2a2

The extension can be activated only by db superuser, so gitlab db
migration scripts does not activate it - it has to be done by DB
administrator or is handled by integrating code in omnibus case.

As we already handle DB setup and migrations in unicorn startup script,
as pre-action there, let's activate pg_trgm.
1 parent 7e999c14
......@@ -35,6 +35,9 @@ while true; do
done
echo "I: PostgreSQL ready." 1>&2
# make sure pg_trgm extension is enabled for gitlab db
psql -c 'CREATE EXTENSION IF NOT EXISTS pg_trgm;' || die "pg_trgm setup failed"
if echo "$pgtables" | grep -q '^No relations found' ; then
$RAKE db:schema:load db:seed_fu || die "initial db setup failed"
fi
......
......@@ -243,7 +243,7 @@ md5sum = cdcb2036c33da547a2cf5d0515cf48ff
[gitlab-unicorn-startup.in]
<= download-file
md5sum = e68d1b5376e79c5e606dce050c633d27
md5sum = a9cb347f60aad3465932fd36cd4fe25d
[gitlab.yml.in]
<= download-template
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!