Permalink
Browse files

Added up/down methods to migration

  • Loading branch information...
1 parent 045015d commit b2f55bae8e8085c6bb8a441fbfc2d1a93c72884d @zmcartor zmcartor committed Mar 3, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 db/migrate/20130302193303_additional_fields_to_user.rb
@@ -1,8 +1,14 @@
class AdditionalFieldsToUser < ActiveRecord::Migration
+def up
change_table :users do |t|
t.integer :age
t.date :birthday
end
+end
+def down
+ remove_column :users, :age
+ remove_column :users, :birthday
+end
end

0 comments on commit b2f55ba

Please sign in to comment.