summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-06-06 19:14:01 +0000
committerYorick Peterse <yorickpeterse@gmail.com>2016-06-06 19:14:01 +0000
commit0ba21860c5ca3df1a1aca916cb0094802e76fd75 (patch)
treef12ead214d1b8003a9acabadf6f1d079042d150a /lib
parentf73292e471232683f314f58e9c58bacac5beb519 (diff)
parent9264203103bbd2b4f46ce777304f210b07765c43 (diff)
downloadgitlab-ce-0ba21860c5ca3df1a1aca916cb0094802e76fd75.tar.gz
Merge branch 'issue_3359' into 'master'
Remove duplicated notification settings and add unique index See merge request !4472
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/database/migration_helpers.rb6
1 files changed, 3 insertions, 3 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.