当我尝试使用以下指令在 Django 中转储模型的数据时:
python manage.py dumpdata app> temp_data.json
它给出了以下错误:
Error: One or more models did not validate:
asset.authpermission: "codename": CharField cannot have a "max_length" greater than 255 when using "unique=True".
asset.djangocontenttype: "app_label": CharField cannot have a "max_length" greater than 255 when using "unique=True".
asset.djangocontenttype: "model": CharField cannot have a "max_length" greater than 255 when using "unique=True".
问题是这些表是由 django 自动生成的。另外我刚刚检查了数据库(mysql),字段是varchar(100)。
怎么了 ?