Project

General

Profile

Revision 5988625d

Added by David Davis over 6 years ago

Fixes #14581 - Fixing migration for Rails 4.2

View differences:

db/migrate/20141209182008_remove_docker_tables.rb
20 20
      tag = DockerTag.find(container.docker_tag_id)
21 21
      container.update_attribute(:tag, tag.tag)
22 22
    end
23
    remove_foreign_key :containers, :name => :containers_docker_image_id_fk
24
    remove_foreign_key :containers, :name => :containers_docker_tag_id_fk
23

  
24
    if foreign_key_exists?(:containers, :name => :containers_docker_image_id_fk)
25
      remove_foreign_key :containers, :name => :containers_docker_image_id_fk
26
    end
27
    if foreign_key_exists?(:containers, :name => :containers_docker_tag_id_fk)
28
      remove_foreign_key :containers, :name => :containers_docker_tag_id_fk
29
    end
30

  
25 31
    remove_column :containers, :docker_image_id
26 32
    remove_column :containers, :docker_tag_id
27 33

  

Also available in: Unified diff