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/utils.sh
parentcdcde75bb782951b27ab9db0d54a71db7c94d7cb (diff)
Grant privileges after database is created
Never drop the database when granting privileges
Diffstat (limited to 'scripts/utils.sh')
-rw-r--r--scripts/utils.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/utils.sh b/scripts/utils.sh
index 08c33f3f67e..2d2ba115563 100644
--- a/scripts/utils.sh
+++ b/scripts/utils.sh
@@ -13,7 +13,17 @@ retry() {
return 1
}
+setup_db_user_only() {
+ if [ "$GITLAB_DATABASE" = "postgresql" ]; then
+ . scripts/create_postgres_user.sh
+ else
+ . scripts/create_mysql_user.sh
+ fi
+}
+
setup_db() {
+ setup_db_user_only
+
bundle exec rake db:drop db:create db:schema:load db:migrate
if [ "$GITLAB_DATABASE" = "mysql" ]; then