EE: Reorganize indexes for the "deployments" table
This is the EE version of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14348 with conflicts resolved.
This is the EE version of https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14348 with conflicts resolved.