Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-05-14 20:49:46 +0300
committerLin Jen-Shin <godfat@godfat.org>2018-05-16 16:52:08 +0300
commit0ab6469187285368d9f64f9ec67dbbcfa3e5a901 (patch)
treecc4a30610d5ade08499667c74c8bcc467db4eb25 /scripts/create_postgres_user.sh
parentcdcde75bb782951b27ab9db0d54a71db7c94d7cb (diff)
Grant privileges after database is created
Never drop the database when granting privileges
Diffstat (limited to 'scripts/create_postgres_user.sh')
-rw-r--r--scripts/create_postgres_user.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/create_postgres_user.sh b/scripts/create_postgres_user.sh
index 8a744df3226..8a049bcd7fb 100644
--- a/scripts/create_postgres_user.sh
+++ b/scripts/create_postgres_user.sh
@@ -1,8 +1,6 @@
#!/bin/bash
psql -h postgres -U postgres postgres <<EOF
-DROP DATABASE IF EXISTS gitlabhq_test;
-CREATE DATABASE gitlabhq_test;
CREATE USER gitlab;
-GRANT ALL PRIVILEGES ON DATABASE gitlabhq_test TO gitlab;
+GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO gitlab;
EOF