summaryrefslogtreecommitdiff
path: root/db/post_migrate/20170927112319_update_notes_type_for_import.rb
blob: 5a400c71b021323c39b053a97ae2e80afe4d630a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 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