socialforge/db/migrate/20150811065543_add_course_a...

26 lines
520 B
Ruby

class AddCourseActivities < ActiveRecord::Migration
def up
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
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
drop_table :user_activities
end
end