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