Project

General

Profile

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

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

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

    
10
    create_table :docker_image_docker_registries do |t|
11
      t.integer :docker_registry_id
12
      t.integer :docker_image_id
13
    end
14

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