Sha256: f1b55487c186e9a631212565fc337e88b79c8c8a018c2f2bac005033ee68e482

Contents?: true

Size: 376 Bytes

Versions: 170

Compression:

Stored size: 376 Bytes

Contents

class AddEnvironmentToHost < ActiveRecord::Migration
  def self.up
    add_column :hosts, :environment, :string unless ActiveRecord::Base.connection.columns(:hosts).collect {|c| c.name}.include?("environment")
  end

  def self.down
    remove_column :hosts, :environment if ActiveRecord::Base.connection.columns(:hosts).collect {|c| c.name}.include?("environment")
  end
end

Version data entries

170 entries across 170 versions & 5 rubygems

Version Path
puppet-retrospec-0.12.2 vendor/gems/puppet-3.7.3/lib/puppet/rails/database/003_add_environment_to_host.rb
puppet-3.8.7 lib/puppet/rails/database/003_add_environment_to_host.rb
puppet-3.8.7-x86-mingw32 lib/puppet/rails/database/003_add_environment_to_host.rb
puppet-3.8.7-x64-mingw32 lib/puppet/rails/database/003_add_environment_to_host.rb
puppet-3.8.6 lib/puppet/rails/database/003_add_environment_to_host.rb
puppet-3.8.6-x86-mingw32 lib/puppet/rails/database/003_add_environment_to_host.rb
puppet-retrospec-0.12.1 vendor/gems/puppet-3.7.3/lib/puppet/rails/database/003_add_environment_to_host.rb
puppet-3.8.6-x64-mingw32 lib/puppet/rails/database/003_add_environment_to_host.rb
puppet-retrospec-0.12.0 vendor/gems/puppet-3.7.3/lib/puppet/rails/database/003_add_environment_to_host.rb
puppet-3.8.5 lib/puppet/rails/database/003_add_environment_to_host.rb
puppet-3.8.5-x86-mingw32 lib/puppet/rails/database/003_add_environment_to_host.rb
puppet-3.8.5-x64-mingw32 lib/puppet/rails/database/003_add_environment_to_host.rb
puppet-3.8.4 lib/puppet/rails/database/003_add_environment_to_host.rb
puppet-3.8.4-x86-mingw32 lib/puppet/rails/database/003_add_environment_to_host.rb
puppet-3.8.4-x64-mingw32 lib/puppet/rails/database/003_add_environment_to_host.rb
puppet-retrospec-0.11.0 vendor/gems/puppet-3.7.3/lib/puppet/rails/database/003_add_environment_to_host.rb
puppet-retrospec-0.10.0 vendor/gems/puppet-3.7.3/lib/puppet/rails/database/003_add_environment_to_host.rb
puppet-retrospec-0.9.1 vendor/gems/puppet-3.7.3/lib/puppet/rails/database/003_add_environment_to_host.rb
puppet-retrospec-0.9.0 vendor/gems/puppet-3.7.3/lib/puppet/rails/database/003_add_environment_to_host.rb
puppet-retrospec-0.8.1 vendor/gems/puppet-3.7.3/lib/puppet/rails/database/003_add_environment_to_host.rb