Project

General

Profile

Revision 588fbfb3

Added by Daniel Lobato Garcia over 6 years ago

Use remove_reference to remove FK with Rails 4

View differences:

db/migrate/20141209182008_remove_docker_tables.rb
28 28
      remove_foreign_key :containers, :name => :containers_docker_tag_id_fk
29 29
    end
30 30

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

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

Also available in: Unified diff