2015-11-13 11:43:44 +08:00
|
|
|
class UserExercise < ActiveRecord::Migration
|
|
|
|
def up
|
2015-11-13 15:47:39 +08:00
|
|
|
create_table :exercise_users do |t|
|
2015-11-13 11:43:44 +08:00
|
|
|
t.integer :user_id
|
|
|
|
t.integer :exercise_id
|
|
|
|
t.integer :score
|
2015-11-13 14:40:14 +08:00
|
|
|
t.datetime :start_at
|
2015-11-13 11:43:44 +08:00
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
2015-11-13 14:40:14 +08:00
|
|
|
drop_table :exercise_user
|
2015-11-13 11:43:44 +08:00
|
|
|
end
|
|
|
|
end
|