Skip to content
This repository has been archived by the owner on Mar 16, 2021. It is now read-only.

Commit

Permalink
Use remove_reference to remove FK with Rails 4
Browse files Browse the repository at this point in the history
  • Loading branch information
dLobatog committed May 27, 2016
1 parent cae1f2c commit 588fbfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/migrate/20141209182008_remove_docker_tables.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def up
remove_foreign_key :containers, :name => :containers_docker_tag_id_fk
end

remove_column :containers, :docker_image_id
remove_column :containers, :docker_tag_id
remove_reference :containers, :docker_image, :foreign_key => true
remove_reference :containers, :docker_tag, :foreign_key => true

# these tables might have foreign keys from plugins like katello so use cascade
cascade_drop(:docker_images)
Expand Down

0 comments on commit 588fbfb

Please sign in to comment.