2015-08-11 15:54:05 +08:00
|
|
|
class AddCourseActivities < ActiveRecord::Migration
|
|
|
|
def up
|
2015-08-29 15:34:18 +08:00
|
|
|
create_table :user_activities do |t|
|
|
|
|
t.string :act_type
|
|
|
|
t.integer :act_id
|
|
|
|
t.string :container_type
|
|
|
|
t.integer :container_id
|
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
|
2015-08-11 15:54:05 +08:00
|
|
|
create_table :course_activities do |t|
|
|
|
|
t.integer :user_id
|
|
|
|
t.integer :course_id
|
|
|
|
t.integer :course_act_id
|
|
|
|
t.string :course_act_type
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
drop_table :course_activities
|
2015-08-29 15:34:18 +08:00
|
|
|
drop_table :user_activities
|
2015-08-11 15:54:05 +08:00
|
|
|
end
|
|
|
|
end
|