Error record: Data too long for column 'xxx' at row 1
When using Flask-sqlalchemy to manipulate data, I get an error: "Data too long for column 'chapter_list' at row 1" has
been searching online for a long time, and found that it is not a coding problem or a character set problem.
So according to the error prompt to test the data length at the same time, it was found: 125968 (Text is more than 60,000), it really exceeded the standard. So I went online to find a long field and found that there are other fields, corresponding to MEDIUMTEXT, LONGTEXT
Method:
from sqlalchemy.dialects.mysql import MEDIUMTEXT
from sqlalchemy.dialects.mysql import LONGTEXT
replace the original db.Text
with many mysql fields, you can find what you need