Sha256: ce10313e342c0f63943ba4779ba0fe04d105944931f8e12b1e56fd846c5397bc

Contents?: true

Size: 1.29 KB

Versions: 16

Compression:

Stored size: 1.29 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, :limit => 255
    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

16 entries across 16 versions & 1 rubygems

Version Path
foreman_remote_execution-1.3.7 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-1.3.6 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-1.4.1 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-1.3.5 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-1.3.4 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-1.3.3 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-1.3.2 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-1.3.1 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-1.3.0 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-1.2.2 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-1.2.1 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-1.2.0 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-1.1.1 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-1.1.0 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-1.0.0 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-0.3.2 db/migrate/20150708133305_add_template_invocation.rb