Sha256: d9799748ea095ac62aceabe165a9d693dd4ef5d3d095ffa7be75c21a84cdd4ea

Contents?: true

Size: 1.27 KB

Versions: 5

Compression:

Stored size: 1.27 KB

Contents

class AddTemplateInvocation < ActiveRecord::Migration
  def change
    create_table :template_invocations do |t|
      t.references :template, :null => false
      t.references :job_invocation, :null => false
    end

    add_index :template_invocations, [:template_id, :job_invocation_id], :name => 'targeting_invocation_template_ji_ids'
    add_foreign_key :template_invocations, :templates, :name => 'template_invoc_template_id', :column => 'template_id'
    add_foreign_key :template_invocations, :job_invocations, :name => 'template_invoc_job_invocation_id', :column => 'job_invocation_id'

    create_table :template_invocation_input_values do |t|
      t.references :template_invocation, :null => false
      t.references :template_input, :null => false
      t.string :value, :null => false
    end

    add_index :template_invocation_input_values, [:template_invocation_id, :template_input_id], :name => 'template_invocation_input_values_ti_ti_ids'
    add_foreign_key :template_invocation_input_values, :template_invocations, :name => 'template_invoc_input_values_template_invoc_id', :column => 'template_invocation_id'
    add_foreign_key :template_invocation_input_values, :template_inputs, :name => 'template_invoc_input_values_template_input_id', :column => 'template_input_id'
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_remote_execution-0.3.1 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-0.3.0 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-0.2.3 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-0.2.2 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-0.2.1 db/migrate/20150708133305_add_template_invocation.rb