Commit 290a51d2 authored by Jasper Maes's avatar Jasper Maes

Rails5: fix Arel::UpdateManager in MigrateOldElasticsearchSettings migration

parent 5d5a96c6
---
title: 'Rails5: fix Arel::UpdateManager in MigrateOldElasticsearchSettings migration'
merge_request: 6815
author: Jasper Maes
type: fixed
class MigrateOldElasticsearchSettings < ActiveRecord::Migration class MigrateOldElasticsearchSettings < ActiveRecord::Migration
include Gitlab::Database::ArelMethods
include Gitlab::Database::MigrationHelpers include Gitlab::Database::MigrationHelpers
DOWNTIME = false DOWNTIME = false
...@@ -23,7 +24,7 @@ class MigrateOldElasticsearchSettings < ActiveRecord::Migration ...@@ -23,7 +24,7 @@ class MigrateOldElasticsearchSettings < ActiveRecord::Migration
end end
updater = updater =
Arel::UpdateManager.new(ActiveRecord::Base) arel_update_manager
.table(settings) .table(settings)
.set(settings[:elasticsearch_url] => urls.join(',')) .set(settings[:elasticsearch_url] => urls.join(','))
.where(settings[:id].eq(id)) .where(settings[:id].eq(id))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment