flask-sqlalchemy.exc.DataError: (pymysql.err.DataError) (1406数据库字段超出长度错误)

这个问题是说数据库user的password字段长度超出,修改长度后,一定要删掉之前的数据库,在重新运行后方能生效,如果之前的user不删除,修改后不会生效,切记切记!

flask-sqlalchemy.exc.DataError: (pymysql.err.DataError) (1406数据库字段超出长度错误)_第1张图片

 

sqlalchemy.exc.DataError

sqlalchemy.exc.DataError: (pymysql.err.DataError) (1406, "Data too long for column 'password' at row 1") [SQL: 'INSERT INTO user (status, nickname, phone_number, email, password, confirmed, beans, send_counter, receive_counter, wx_open_id, wx_name) VALUES (%(status)s, %(nickname)s, %(phone_number)s, %(email)s, %(password)s, %(confirmed)s, %(beans)s, %(send_counter)s, %(receive_counter)s, %(wx_open_id)s, %(wx_name)s)'] [parameters: {'status': 1, 'nickname': 'kirin2', 'phone_number': None, 'email': '[email protected]', 'password': '76468d48a8d1706b613a739a172f0a2e', 'confirmed': 0, 'beans': 0, 'send_counter': 0, 'receive_counter': 0, 'wx_open_id': None, 'wx_name': None}] (Background on this error at: http://sqlalche.me/e/9h9h)

flask-sqlalchemy.exc.DataError: (pymysql.err.DataError) (1406数据库字段超出长度错误)_第2张图片

你可能感兴趣的:(flask框架,python语言)