Commit a63e886d authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'rails5-fix-migration-add-milestone-to-lists' into 'master'

Rails5 fix AddMilestoneToLists migration rollback deleting wrong foreign key

See merge request gitlab-org/gitlab-ee!6865
parents fd21d1b7 d8dad0ec
---
title: Rails5 fix AddMilestoneToLists migration rollback deleting wrong foreign key
merge_request: 6865
author: Jasper Maes
type: fixed
class AddMilestoneToLists < ActiveRecord::Migration
DOWNTIME = false
def change
def up
add_reference :lists, :milestone, index: true, foreign_key: { on_delete: :cascade }
end
def down
remove_reference :lists, :milestone, foreign_key: true
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment