Sha256: febcc69dae091d3a87c6bfa8f8760b459c64285e04dbea357c33a5a997718ebd

Contents?: true

Size: 572 Bytes

Versions: 19

Compression:

Stored size: 572 Bytes

Contents

class AddTestObjectColumns < ActiveRecord::Migration
  def self.up
    add_column :appstats_test_objects, :last_name, :string
    [:binary,:boolean,:date,:datetime,:decimal,:float,:integer,:string,:text,:time,:timestamp].each do |type|
      add_column :appstats_test_objects, "blah_#{type}", type  
    end
  end

  def self.down
    remove_column :appstats_test_objects, :last_name
    [:binary,:boolean,:date,:datetime,:decimal,:float,:integer,:string,:text,:time,:timestamp].each do |type|
      remove_column :appstats_test_objects, "blah_#{type}"
    end
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
appstats-0.25.1 db/migrate/20110510173343_add_test_object_columns.rb
appstats-0.25.0 db/migrate/20110510173343_add_test_object_columns.rb
appstats-0.24.0 db/migrate/20110510173343_add_test_object_columns.rb
appstats-0.23.5 db/migrations/20110510173343_add_test_object_columns.rb
appstats-0.23.4 db/migrations/20110510173343_add_test_object_columns.rb
appstats-0.23.3 db/migrations/20110510173343_add_test_object_columns.rb
appstats-0.23.2 db/migrations/20110510173343_add_test_object_columns.rb
appstats-0.23.1 db/migrations/20110510173343_add_test_object_columns.rb
appstats-0.23.0 db/migrations/20110510173343_add_test_object_columns.rb
appstats-0.22.6 db/migrations/20110510173343_add_test_object_columns.rb
appstats-0.22.5 db/migrations/20110510173343_add_test_object_columns.rb
appstats-0.22.4 db/migrations/20110510173343_add_test_object_columns.rb
appstats-0.22.3 db/migrations/20110510173343_add_test_object_columns.rb
appstats-0.22.2 db/migrations/20110510173343_add_test_object_columns.rb
appstats-0.22.1 db/migrations/20110510173343_add_test_object_columns.rb
appstats-0.22.0 db/migrations/20110510173343_add_test_object_columns.rb
appstats-0.21.3 db/migrations/20110510173343_add_test_object_columns.rb
appstats-0.21.2 db/migrations/20110510173343_add_test_object_columns.rb
appstats-0.21.1 db/migrations/20110510173343_add_test_object_columns.rb