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.5.2 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.5.1.1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.5.1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.5.0.1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.5.0 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.5.0.rc2 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.5.0.rc1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.4.5 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.4.4 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.4.2 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.4.1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.4.0.2 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.4.0.1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.3.2 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.4.0 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.4.0.rc2 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.4.0.rc1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.3.1.1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.3.1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb
katello-3.3.0.1 db/migrate/20140502164009_rename_system_groups_to_host_collections.rb