fix cross shard attachment bug

fixes CNVS-11511

test plan
 - upload a file on the default shard
 - in script console manually set the namespace to
   what it would be on the other shards account
 - upload the same file on a different shard
 - it should not cause a db FK error

Change-Id: I0338753202c5c68980bb7c2f3337ca3f4eefd650
Reviewed-on: https://gerrit.instructure.com/31051
Reviewed-by: Anthus Williams <awilliams@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>