Sha256: 5bc5631b75d3665831c3a2701fc290d1f8705957e54020cc39e776e46d59fa80

Contents?: true

Size: 1.22 KB

Versions: 193

Compression:

Stored size: 1.22 KB

Contents

class AddMissingForeignKeys < ActiveRecord::Migration[4.2]
  def up
    add_foreign_key(:katello_capsule_lifecycle_environments, :smart_proxies,
                    :name => 'katello_capsule_lifecycle_environments_capsule_fk', :column => 'capsule_id')
    add_foreign_key(:katello_capsule_lifecycle_environments, :katello_environments,
                    :name => 'katello_capsule_lifecycle_environments_environment_fk', :column => 'lifecycle_environment_id')
    add_foreign_key(:katello_repositories, :katello_environments,
                    :name => 'katello_repositories_environment_fk', :column => 'environment_id')
    add_foreign_key(:katello_repositories, :katello_products,
                    :name => 'katello_repositories_product_fk', :column => 'product_id')
  end

  def down
    remove_foreign_key('katello_capsule_lifecycle_environments', :name => 'katello_capsule_lifecycle_environments_capsule_fk')
    remove_foreign_key('katello_capsule_lifecycle_environments', :name => 'katello_capsule_lifecycle_environments_environment_fk')
    remove_foreign_key('katello_repositories', :name => 'katello_repositories_environment_fk')
    remove_foreign_key('katello_repositories', :name => 'katello_repositories_product_fk')
  end
end

Version data entries

193 entries across 193 versions & 1 rubygems

Version Path
katello-4.15.0.rc2 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-4.15.0.rc1 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-4.14.1 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-4.14.0 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-4.14.0.rc3 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-4.14.0.rc2 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-4.14.0.rc1.1 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-4.14.0.rc1 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-4.13.1 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-4.13.0 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-4.12.1 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-4.13.0.rc1 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-4.12.0 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-4.12.0.rc3 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-4.12.0.rc2 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-4.12.0.rc1 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-4.11.1 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-4.11.0 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-4.11.0.rc2 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-4.11.0.rc1 db/migrate/20140626055258_add_missing_foreign_keys.rb