allpro/db/migrate/20130810191419_add_fields_to_workout.rb

12 lines
323 B
Ruby
Raw Permalink Normal View History

2013-08-10 22:15:26 -04:00
class AddFieldsToWorkout < ActiveRecord::Migration
def self.up
add_column :workouts, :comment, :text, :null => false, :default => ''
add_column :workouts, :type, :string, :null => false, :default => 'Heavy'
end
def self.down
remove_column :workouts, :comment
remove_column :workouts, :type
end
end