Sha256: 85cb680fc84528e68f086f8224fc450cc7d87926c478828a4c2b049977724492

Contents?: true

Size: 1.21 KB

Versions: 54

Compression:

Stored size: 1.21 KB

Contents

class AddMissingForeignKeys < ActiveRecord::Migration
  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

54 entries across 54 versions & 1 rubygems

Version Path
katello-3.5.2 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-3.5.1.1 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-3.5.1 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-3.5.0.1 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-3.5.0 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-3.5.0.rc2 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-3.5.0.rc1 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-3.4.5 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-3.4.4 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-3.4.2 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-3.4.1 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-3.4.0.2 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-3.4.0.1 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-3.3.2 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-3.4.0 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-3.4.0.rc2 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-3.4.0.rc1 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-3.3.1.1 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-3.3.1 db/migrate/20140626055258_add_missing_foreign_keys.rb
katello-3.3.0.1 db/migrate/20140626055258_add_missing_foreign_keys.rb