Add index to make "assignee" callback faster

This commit is contained in:
Pavel Shved 2012-06-01 18:39:59 +04:00 committed by George Vinogradov
parent 8629d67030
commit 3af72beb41
2 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,5 @@
class AddNamePlatformIndexToBuildListPackages < ActiveRecord::Migration
def change
add_index :build_list_packages, [:name,:project_id]
end
end

View File

@ -96,6 +96,7 @@ ActiveRecord::Schema.define(:version => 20120730214052) do
end
add_index "build_list_packages", ["build_list_id"], :name => "index_build_list_packages_on_build_list_id"
add_index "build_list_packages", ["name", "project_id"], :name => "index_build_list_packages_on_name_and_project_id"
add_index "build_list_packages", ["platform_id"], :name => "index_build_list_packages_on_platform_id"
add_index "build_list_packages", ["project_id"], :name => "index_build_list_packages_on_project_id"