Sha256: 5a800d37c5ceeee6a62c228618718b659907cf9f46d26bd134f61d579ced658f

Contents?: true

Size: 1.89 KB

Versions: 43

Compression:

Stored size: 1.89 KB

Contents

class RenameSystemGroupsToHostCollections < ActiveRecord::Migration
  def change
    rename_index :katello_key_system_groups, "index_key_system_groups_on_activation_key_id", "index_key_host_collections_on_activation_key_id"
    rename_index :katello_key_system_groups, "index_key_system_groups_on_system_group_id", "index_key_host_collections_on_host_collection_id"

    remove_foreign_key :katello_key_system_groups, :name => "key_system_groups_system_group_id_fk"

    rename_column :katello_key_system_groups, :system_group_id, :host_collection_id
    rename_table :katello_key_system_groups, :katello_key_host_collections

    rename_index :katello_system_groups, "index_system_groups_on_name_and_organization_id", "index_host_collections_on_name_and_organization_id"
    rename_index :katello_system_groups, "index_system_groups_on_organization_id", "index_host_collections_on_organization_id"
    rename_column :katello_system_groups, :max_systems, :max_content_hosts
    rename_table :katello_system_groups, :katello_host_collections

    add_foreign_key :katello_key_host_collections, :katello_host_collections, :name => "key_system_groups_system_group_id_fk", :column => "host_collection_id"

    rename_index :katello_system_system_groups, "index_system_system_groups_on_system_group_id", "index_system_host_collections_on_host_collection_id"
    rename_index :katello_system_system_groups, "index_system_system_groups_on_system_id", "index_system_host_collections_on_system_id"
    remove_foreign_key :katello_system_system_groups, :name => "system_system_groups_system_group_id_fk"
    rename_column :katello_system_system_groups, :system_group_id, :host_collection_id
    rename_table :katello_system_system_groups, :katello_system_host_collections
    add_foreign_key :katello_system_host_collections, :katello_host_collections, :name => "system_system_groups_system_group_id_fk", :column => "host_collection_id"
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
katello-3.3.0 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.3.0.rc2 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.3.0.rc1.1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.3.0.rc1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.2.1.1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.2.1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.2.0 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.2.0.rc3 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.2.0.rc2 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.2.0.rc1.1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.2.0.rc1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.1.0.1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.1.0 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.1.0.rc2.1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.0.2 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.1.0.rc1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.0.1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.0.0 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.0.0.rc7 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.0.0.rc5 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb