添加CourseStatus表和model

This commit is contained in:
nwb 2014-05-29 16:47:32 +08:00
parent f936c30ec9
commit ea3b80fdc6
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,3 @@
class CourseStatus < ActiveRecord::Base
attr_accessible :changesets_count, :course_ac_para, :course_id, :grade, :watchers_count
end

View File

@ -0,0 +1,13 @@
class CreateCourseStatuses < ActiveRecord::Migration
def change
create_table :course_statuses do |t|
t.integer :changesets_count
t.integer :watchers_count
t.integer :course_id
t.float :grade ,default:0
t.integer :course_ac_para ,default:0
t.timestamps
end
end
end