2017-11-17 13:38:14 +00:00
|
|
|
# rubocop:disable Migration/UpdateLargeTable
|
2017-09-29 11:18:58 +00:00
|
|
|
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
|