summaryrefslogtreecommitdiff
path: root/scripts/utils.sh
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-05-15 01:49:46 +0800
committerLin Jen-Shin <godfat@godfat.org>2018-05-16 21:52:08 +0800
commit0ab6469187285368d9f64f9ec67dbbcfa3e5a901 (patch)
treecc4a30610d5ade08499667c74c8bcc467db4eb25 /scripts/utils.sh
parentcdcde75bb782951b27ab9db0d54a71db7c94d7cb (diff)
downloadgitlab-ce-0ab6469187285368d9f64f9ec67dbbcfa3e5a901.tar.gz
Grant privileges after database is createdce-5980-add-ce-upgrade-ee-test
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