BigW Consortium Gitlab

20150918161719_remove_invalid_milestones_from_merge_requests.rb 229 Bytes
Newer Older
1
# rubocop:disable all
2 3 4 5 6
class RemoveInvalidMilestonesFromMergeRequests < ActiveRecord::Migration
  def up
    execute("UPDATE merge_requests SET milestone_id = NULL where milestone_id NOT IN (SELECT id FROM milestones)")
  end
end