2017-11-17 13:38:14 +00:00
|
|
|
# rubocop:disable Migration/UpdateLargeTable
|
2017-09-29 11:18:58 +00:00
|
|
|
class UpdateLegacyDiffNotesTypeForImport < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
def up
|
|
|
|
update_column_in_batches(:notes, :type, 'LegacyDiffNote') do |table, query|
|
|
|
|
query.where(table[:type].eq('Github::Import::LegacyDiffNote'))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
end
|
|
|
|
end
|