Sha256: 76d6e295372763f16ed1c9fa250d9adf9e3a2d2a1213a9349e9e9ab01ae3a023
Contents?: true
Size: 440 Bytes
Versions: 6
Compression:
Stored size: 440 Bytes
Contents
class AddEnvironmentToHost < ActiveRecord::Migration def self.up unless ActiveRecord::Base.connection.columns(:hosts).collect {|c| c.name}.include?("environment") add_column :hosts, :environment, :string end end def self.down if ActiveRecord::Base.connection.columns(:hosts).collect {|c| c.name}.include?("environment") remove_column :hosts, :environment end end end
Version data entries
6 entries across 6 versions & 1 rubygems