Project

General

Profile

Download (1.28 KB) Statistics
| Branch: | Tag: | Revision:

foreman-docker / db / migrate / 20141222113313_create_wizard_states.rb @ 7ff105d1

1
class CreateWizardStates < ActiveRecord::Migration
2
  # rubocop:disable Metrics/MethodLength
3
  def change
4
    create_table :docker_container_wizard_states, &:timestamps
5

    
6
    create_table :docker_container_wizard_states_preliminaries do |t|
7
      t.integer :compute_resource_id, :null => false
8
      t.references :docker_container_wizard_state, :null => false
9
      t.timestamps
10
    end
11

    
12
    create_table :docker_container_wizard_states_images do |t|
13
      t.integer :registry_id
14
      t.string :repository_name, :null => false
15
      t.string :tag, :null => false
16
      t.references :docker_container_wizard_state, :null => false
17
      t.timestamps
18
    end
19

    
20
    create_table :docker_container_wizard_states_configurations do |t|
21
      t.string :name
22
      t.string :command
23
      t.string :entrypoint
24
      t.integer :cpu_set
25
      t.float :cpu_shares
26
      t.string :memory
27
      t.references :docker_container_wizard_state, :null => false
28
      t.timestamps
29
    end
30

    
31
    create_table :docker_container_wizard_states_environments do |t|
32
      t.boolean :tty
33
      t.boolean :attach_stdin, :default => true
34
      t.boolean :attach_stdout, :default => true
35
      t.boolean :attach_stderr, :default => true
36
      t.references :docker_container_wizard_state, :null => false
37
      t.timestamps
38
    end
39
  end
40
end