课程学生列表显示太慢,需要对表加索引

This commit is contained in:
lizanle 2015-05-05 10:58:37 +08:00
parent 8929644ab1
commit 71004e2f78
5 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,5 @@
class AddIndexToHomeworkattachBidId < ActiveRecord::Migration
def change
add_index(:homework_attaches,:bid_id)
end
end

View File

@ -0,0 +1,5 @@
class AddIndexToStudentforcourseStudentId < ActiveRecord::Migration
def change
add_index(:students_for_courses,:student_id)
end
end

View File

@ -0,0 +1,5 @@
class AddIndexToStudentforcourseCourseId < ActiveRecord::Migration
def change
add_index(:students_for_courses,:course_id)
end
end

View File

@ -0,0 +1,5 @@
class AddIndexToHomeworkattachCourseId < ActiveRecord::Migration
def change
add_index(:homework_for_courses,:course_id)
end
end

View File

@ -0,0 +1,5 @@
class AddIndexToHomeworkforcourseBidId < ActiveRecord::Migration
def change
add_index(:homework_for_courses,:bid_id)
end
end