[12-3-auto-deploy] Fix member expiration not always working
requested to merge sh-members-expiration-index-12-3-auto-deploy-20190911 into 12-3-auto-deploy-20190911
The Sidekiq job RemoveExpiredMembersWorker
was failing to run in
production because it was hitting statement timeouts because it was
scanning all rows in order. On staging, where it used to scan 4 million
rows, adding an index brought this down to only a few hundred rows.
This commit backports https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/32951 for 12-3-auto-deploy-20190911.
Edited by Stan Hu