avoid running unsharded query in migrations for new shards

Change-Id: I11eadea36cc6e05a010f1d831d32a5d91b5fd6bb
Reviewed-on: https://gerrit.instructure.com/36783
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>