diff options
author | Stan Hu <stanhu@gmail.com> | 2018-05-17 22:17:20 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-05-17 22:17:20 +0000 |
commit | d3adee5105d4c7745b03ad23999d20fd42b3c575 (patch) | |
tree | b1a67f0dfec96ab4ada3e5363317ce408269e46b /scripts/utils.sh | |
parent | f214efb87bd345490277b9962b43752c095c0b2c (diff) | |
parent | d6c8a55189d62430c7ca4ffa6e5bb63f15a7efc1 (diff) | |
download | gitlab-ce-sh-move-delete-groups-api-async.tar.gz |
Merge branch 'master' into 'sh-move-delete-groups-api-async'sh-move-delete-groups-api-async
# Conflicts:
# lib/api/v3/groups.rb
Diffstat (limited to 'scripts/utils.sh')
-rw-r--r-- | scripts/utils.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/utils.sh b/scripts/utils.sh index 6faa701f0ce..2d2ba115563 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -12,3 +12,21 @@ retry() { done 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 + bundle exec rake add_limits_mysql + fi +} |