Sha256: c42586b334a5f14b7635368fe657252e965b0c2feaf5b624439c17f8abf48ab8

Contents?: true

Size: 1.29 KB

Versions: 148

Compression:

Stored size: 1.29 KB

Contents

class AddTemplateInvocation < ActiveRecord::Migration[4.2]
  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

148 entries across 148 versions & 1 rubygems

Version Path
foreman_remote_execution-13.2.8 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-15.0.2 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-15.0.1 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-13.2.7 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-15.0.0 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-14.1.4 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-14.1.3 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-14.1.2 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-14.1.1 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-14.1.0 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-14.0.2 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-14.0.1 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-13.2.6 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-14.0.0 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-13.2.5 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-13.2.4 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-13.2.3 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-13.2.2 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-12.0.7 db/migrate/20150708133305_add_template_invocation.rb
foreman_remote_execution-13.2.1 db/migrate/20150708133305_add_template_invocation.rb