summaryrefslogtreecommitdiff
path: root/db/migrate/20170918223303_add_deployments_index_for_last_deployment.rb
Commit message (Collapse)AuthorAgeFilesLines
* Reorganize indexes for the "deployments" tablereoganize-deployment-indexesYorick Peterse2017-09-191-0/+21
This removes the need for a default scope that adds a "WHERE project_id = X" clause. This commit also includes an additional index for Environment#last_deployment, ensuring this query uses just an index scan instead of also applying a Filter. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36877