do some data fixes before adding foreign key

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