Sha256: bfd4467cadd0986af3f0b093a472d45aabb7c522177f86484394b413d90acff3

Contents?: true

Size: 325 Bytes

Versions: 37

Compression:

Stored size: 325 Bytes

Contents

class AddEnvironmentToTemplateCombinations < ActiveRecord::Migration[4.2]
  def up
    add_reference :template_combinations, :environment, foreign_key: true unless column_exists?(:template_combinations, :environment_id)
  end

  def down
    remove_reference :template_combinations, :environment, foreign_key: true
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
foreman_puppet-3.0.7 db/migrate/20101121140000_add_environment_to_template_combinations.foreman_puppet.rb
foreman_puppet-2.0.7 db/migrate/20101121140000_add_environment_to_template_combinations.foreman_puppet.rb
foreman_puppet-4.0.1 db/migrate/20101121140000_add_environment_to_template_combinations.foreman_puppet.rb
foreman_puppet-4.0.0 db/migrate/20101121140000_add_environment_to_template_combinations.foreman_puppet.rb
foreman_puppet-3.0.6 db/migrate/20101121140000_add_environment_to_template_combinations.foreman_puppet.rb
foreman_puppet-2.0.6 db/migrate/20101121140000_add_environment_to_template_combinations.foreman_puppet.rb
foreman_puppet-2.0.5 db/migrate/20101121140000_add_environment_to_template_combinations.foreman_puppet.rb
foreman_puppet-3.0.5 db/migrate/20101121140000_add_environment_to_template_combinations.foreman_puppet.rb
foreman_puppet-3.0.4 db/migrate/20101121140000_add_environment_to_template_combinations.foreman_puppet.rb
foreman_puppet-2.0.4 db/migrate/20101121140000_add_environment_to_template_combinations.foreman_puppet.rb
foreman_puppet-3.0.3 db/migrate/20101121140000_add_environment_to_template_combinations.foreman_puppet.rb
foreman_puppet-3.0.2 db/migrate/20101121140000_add_environment_to_template_combinations.foreman_puppet.rb
foreman_puppet-2.0.3 db/migrate/20101121140000_add_environment_to_template_combinations.foreman_puppet.rb
foreman_puppet-3.0.1 db/migrate/20101121140000_add_environment_to_template_combinations.foreman_puppet.rb
foreman_puppet-2.0.2 db/migrate/20101121140000_add_environment_to_template_combinations.foreman_puppet.rb
foreman_puppet-2.0.0 db/migrate/20101121140000_add_environment_to_template_combinations.foreman_puppet.rb
foreman_puppet-2.0.0.alpha.2 db/migrate/20101121140000_add_environment_to_template_combinations.foreman_puppet.rb