debian-mirror-gitlab/db/migrate/20160819221833_reset_diff_note_discussion_id_because_it_was_calculated_wrongly.rb

13 lines
416 B
Ruby
Raw Normal View History

2016-09-13 17:45:13 +05:30
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
2019-02-15 15:39:39 +05:30
class ResetDiffNoteDiscussionIdBecauseItWasCalculatedWrongly < ActiveRecord::Migration[4.2]
2016-09-13 17:45:13 +05:30
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
execute "UPDATE notes SET discussion_id = NULL WHERE discussion_id IS NOT NULL AND type = 'DiffNote'"
end
end