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