Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20170927112318_update_legacy_diff_notes_type_for_import.rb « post_migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a238216253b8956a5a540ce7c2b1a4a39041013b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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