Project

General

Profile

Download (579 Bytes) Statistics
| Branch: | Tag: | Revision:

foreman_docker / db / migrate / 20141024163003_create_docker_registries.rb @ ada932ab

1
class CreateDockerRegistries < ActiveRecord::Migration
2
  def change
3
    create_table :docker_registries do |t|
4
      t.string :url
5
      t.string :name
6
      t.integer :id
7
      t.string :description
8
      t.timestamps
9
    end
10

    
11
    create_table :docker_image_docker_registries do |t|
12
      t.integer :id
13
      t.integer :docker_registry_id
14
      t.integer :docker_image_id
15
    end
16

    
17
    add_index :docker_image_docker_registries,
18
              [:docker_registry_id, :docker_image_id],
19
              :name => 'by_docker_image_and_registry',
20
              :unique => true
21
  end
22
end