debian-mirror-gitlab/db/post_migrate/20170927112318_update_legacy_diff_notes_type_for_import.rb
2019-01-03 12:48:30 +05:30

18 lines
400 B
Ruby

# rubocop:disable Migration/UpdateLargeTable
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