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

20140122114406_migrate_mr_diffs.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 20d28a89f29599e5ce3f7b2c11ea08da259b7383 (plain)
1
2
3
4
5
6
7
8
9
10
# rubocop:disable all
class MigrateMrDiffs < ActiveRecord::Migration[4.2]
  def self.up
    execute "INSERT INTO merge_request_diffs ( merge_request_id, st_commits, st_diffs ) SELECT id, st_commits, st_diffs FROM merge_requests"
  end

  def self.down
    MergeRequestDiff.delete_all
  end
end