2018-03-17 18:26:18 +05:30
|
|
|
# rubocop:disable Migration/UpdateLargeTable
|
2019-02-15 15:39:39 +05:30
|
|
|
class UpdateLegacyDiffNotesTypeForImport < ActiveRecord::Migration[4.2]
|
2018-03-17 18:26:18 +05:30
|
|
|
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
|