diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-07 10:26:27 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-07 10:26:27 +0200 |
commit | 6e64d1ac7631675008832111f3759c007bda4504 (patch) | |
tree | a2918d570353f35b3794592fb970be4a6d06ad70 /lib | |
parent | dbf235f514cc919a10fee1d9ab8dc1c75bc25238 (diff) | |
parent | 9e256de4ac33e284ceb88c6af410f87c5f51228d (diff) | |
download | gitlab-ce-6e64d1ac7631675008832111f3759c007bda4504.tar.gz |
Merge remote-tracking branch 'origin/master' into rename-ci-commit-phase-2
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/database/migration_helpers.rb | 6 | ||||
-rw-r--r-- | lib/tasks/gitlab/setup.rake | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/gitlab/database/migration_helpers.rb b/lib/gitlab/database/migration_helpers.rb index fd14234c558..978c3f7896d 100644 --- a/lib/gitlab/database/migration_helpers.rb +++ b/lib/gitlab/database/migration_helpers.rb @@ -11,7 +11,7 @@ module Gitlab # add_concurrent_index :users, :some_column # # See Rails' `add_index` for more info on the available arguments. - def add_concurrent_index(*args) + def add_concurrent_index(table_name, column_name, options = {}) if transaction_open? raise 'add_concurrent_index can not be run inside a transaction, ' \ 'you can disable transactions by calling disable_ddl_transaction! ' \ @@ -19,10 +19,10 @@ module Gitlab end if Database.postgresql? - args << { algorithm: :concurrently } + options = options.merge({ algorithm: :concurrently }) end - add_index(*args) + add_index(table_name, column_name, options) end # Updates the value of a column in batches. diff --git a/lib/tasks/gitlab/setup.rake b/lib/tasks/gitlab/setup.rake index 48baecfd2a2..05fcb8e3da5 100644 --- a/lib/tasks/gitlab/setup.rake +++ b/lib/tasks/gitlab/setup.rake @@ -19,7 +19,7 @@ namespace :gitlab do Rake::Task["setup_postgresql"].invoke Rake::Task["db:seed_fu"].invoke rescue Gitlab::TaskAbortedByUserError - puts "Quitting...".red + puts "Quitting...".color(:red) exit 1 end end |