2015-11-13 11:43:44 +08:00
|
|
|
class Exercise < ActiveRecord::Migration
|
|
|
|
def up
|
2015-11-13 15:47:39 +08:00
|
|
|
create_table :exercises do |t|
|
2015-11-13 11:43:44 +08:00
|
|
|
t.string :exercise_name
|
|
|
|
t.text :exercise_description
|
|
|
|
t.integer :course_id
|
|
|
|
t.integer :exercise_status
|
|
|
|
t.integer :user_id
|
2015-11-13 14:40:14 +08:00
|
|
|
t.integer :time
|
2015-11-13 11:43:44 +08:00
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
drop_table :exercise
|
|
|
|
end
|
|
|
|
end
|