debian-mirror-gitlab/db/post_migrate/20170927112319_update_notes_type_for_import.rb
2018-03-17 18:26:18 +05:30

18 lines
370 B
Ruby

# rubocop:disable Migration/UpdateLargeTable
class UpdateNotesTypeForImport < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
update_column_in_batches(:notes, :type, 'Note') do |table, query|
query.where(table[:type].eq('Github::Import::Note'))
end
end
def down
end
end