diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-05-14 20:49:46 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-05-16 16:52:08 +0300 |
commit | 0ab6469187285368d9f64f9ec67dbbcfa3e5a901 (patch) | |
tree | cc4a30610d5ade08499667c74c8bcc467db4eb25 /scripts/create_postgres_user.sh | |
parent | cdcde75bb782951b27ab9db0d54a71db7c94d7cb (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.sh | 4 |
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 |