Commit d8dad0ec authored by Jasper Maes's avatar Jasper Maes

Rails5 fix AddMilestoneToLists migration rollback deleting wrong foreign key

parent 13b41035
---
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