Migrations assumed that an import of the models.Model class must already be included when it's serialized, but for models with only custom fields this was not necessarily the case. Thanks Jaap Joris Vens for the report.