Skip to content
Snippets Groups Projects
Commit ac289687 authored by Stan Hu's avatar Stan Hu
Browse files

Merge branch 'fix-dangling-milestone-ids' into 'master'

Remove deleted milestones from merge requests

This is related to !1348 but thought it would be useful as a separate MR. This MR removes deleted milestone IDs from any merge request.

Closes https://github.com/gitlabhq/gitlabhq/issues/9643

See merge request !1350
parents d4acda12 24a0e86d
No related branches found
No related tags found
No related merge requests found
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment