From 0ab6469187285368d9f64f9ec67dbbcfa3e5a901 Mon Sep 17 00:00:00 2001 From: Lin Jen-Shin Date: Tue, 15 May 2018 01:49:46 +0800 Subject: Grant privileges after database is created Never drop the database when granting privileges --- scripts/utils.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'scripts/utils.sh') 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 -- cgit v1.2.3