Explanation is in the documentation. It is a serialization issue. The class you getting in the migrations are very basics.
https://docs.djangoproject.com/en/5.2/topics/migrations/#historical-models