Remove deleted milestones from merge requests

Closes https://github.com/gitlabhq/gitlabhq/issues/9643
This commit is contained in:
Stan Hu 2015-09-18 09:22:43 -07:00
parent abaa65efc1
commit 24a0e86dd3

View file

@ -0,0 +1,5 @@
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