Sha256: ec87d1df4b7a69ee4d48c73e9f7e2a5451eac02510a10e4776088a7c5d713ece

Contents?: true

Size: 1.08 KB

Versions: 166

Compression:

Stored size: 1.08 KB

Contents

class CreateDockerTables < ActiveRecord::Migration[4.2]
  def up
    create_table :katello_docker_images do |t|
      t.string :image_id, :limit => 255
      t.integer :size
      t.string :uuid, :limit => 255
      t.timestamps
    end
    create_table :katello_docker_tags do |t|
      t.string :name, :limit => 255
      t.integer :docker_image_id
      t.integer :repository_id
      t.timestamps
    end
    add_index :katello_docker_images, :uuid, :unique => true
    add_foreign_key :katello_docker_tags, :katello_docker_images, :column => "docker_image_id"
    add_foreign_key :katello_docker_tags, :katello_repositories, :column => "repository_id"

    add_index :katello_docker_tags, [:docker_image_id, :repository_id, :name],
              :name => :docker_tag_docker_image_repo_name, :unique => true
  end

  def down
    remove_foreign_key :katello_docker_tags, :name => "katello_docker_tags_docker_image_id_fk"
    remove_foreign_key :katello_docker_tags, :name => "katello_docker_tags_repository_id_fk"
    drop_table :katello_docker_images
    drop_table :katello_docker_tags
  end
end

Version data entries

166 entries across 166 versions & 1 rubygems

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