Message store event migration needs to handle old-style index-only foreign keys

We handle these in the model code, but not the migration code.