加索引
This commit is contained in:
parent
bec09a7f1c
commit
d8bc6a51fc
|
@ -0,0 +1,7 @@
|
|||
class AddIndexToCourseContributorScores < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :course_contributor_scores, [:course_id, :user_id]
|
||||
add_index :members, :course_id
|
||||
add_index :course_groups, :course_id
|
||||
end
|
||||
end
|
|
@ -11,7 +11,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20160907055119) do
|
||||
ActiveRecord::Schema.define(:version => 20160907061917) do
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
@ -517,6 +517,8 @@ ActiveRecord::Schema.define(:version => 20160907055119) do
|
|||
t.integer "news_num", :default => 0
|
||||
end
|
||||
|
||||
add_index "course_contributor_scores", ["course_id", "user_id"], :name => "index_course_contributor_scores_on_course_id_and_user_id"
|
||||
|
||||
create_table "course_groups", :force => true do |t|
|
||||
t.string "name"
|
||||
t.integer "course_id"
|
||||
|
@ -524,6 +526,8 @@ ActiveRecord::Schema.define(:version => 20160907055119) do
|
|||
t.datetime "updated_at", :null => false
|
||||
end
|
||||
|
||||
add_index "course_groups", ["course_id"], :name => "index_course_groups_on_course_id"
|
||||
|
||||
create_table "course_infos", :force => true do |t|
|
||||
t.integer "course_id"
|
||||
t.integer "user_id"
|
||||
|
@ -1140,6 +1144,7 @@ ActiveRecord::Schema.define(:version => 20160907055119) do
|
|||
t.integer "is_collect", :default => 1
|
||||
end
|
||||
|
||||
add_index "members", ["course_id"], :name => "index_members_on_course_id"
|
||||
add_index "members", ["project_id"], :name => "index_members_on_project_id"
|
||||
add_index "members", ["user_id", "project_id", "course_id"], :name => "index_members_on_user_id_and_project_id", :unique => true
|
||||
add_index "members", ["user_id"], :name => "index_members_on_user_id"
|
||||
|
|
Loading…
Reference in New Issue