首页 > 其他分享 >django.db.utils.DataError: (1406, "Data too long for column 'password' at row 1"

django.db.utils.DataError: (1406, "Data too long for column 'password' at row 1"

时间:2022-12-14 15:33:25浏览次数:72  
标签:DataError column utils long too password Data row

问题: python manage.py createsuperuser  无法创建超级用户

报错:django.db.utils.DataError: (1406, "Data too long for column 'password' at row 1")

问题原因:用户模型继承 AbstractUser,但是重写了password字段,重新定义max_length参数,导致冲突

解决:注释掉重写的password字段,重新进行迁移命令

 

标签:DataError,column,utils,long,too,password,Data,row
From: https://www.cnblogs.com/yu121/p/16982306.html

相关文章