# class AddEnvironmentToHost

### Public Class Methods

down() click to toggle source

    # File lib/puppet/rails/database/003_add_environment_to_host.rb, line 6
    def self.down
      remove_column :hosts, :environment if ActiveRecord::Base.connection.columns(:hosts).collect {|c| c.name}.include?("environment")
    end

up() click to toggle source

    # File lib/puppet/rails/database/003_add_environment_to_host.rb, line 2
    def self.up
      add_column :hosts, :environment, :string unless ActiveRecord::Base.connection.columns(:hosts).collect {|c| c.name}.include?("environment")
    end