pymysql.err.DataError: (1406, "Data too long for column 'po_no' at row 32022")

i have restore a database then run this command
bench --site migrate --skip-failing

after run this command I got an error!

Updating DocTypes for frappe : [========================================] 100%
Updating DocTypes for erpnext : [== ] 7%

There was an issue while migrating the DocType: Sales Invoice

File “/home/frappe/frappe-bench/env/lib/python3.9/site-packages/pymysql/”, line 310, in _query
File “/home/frappe/frappe-bench/env/lib/python3.9/site-packages/pymysql/”, line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/home/frappe/frappe-bench/env/lib/python3.9/site-packages/pymysql/”, line 775, in _read_query_result
File “/home/frappe/frappe-bench/env/lib/python3.9/site-packages/pymysql/”, line 1156, in read
first_packet = self.connection._read_packet()
File “/home/frappe/frappe-bench/env/lib/python3.9/site-packages/pymysql/”, line 725, in _read_packet
File “/home/frappe/frappe-bench/env/lib/python3.9/site-packages/pymysql/”, line 221, in raise_for_error
File “/home/frappe/frappe-bench/env/lib/python3.9/site-packages/pymysql/”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.DataError: (1406, “Data too long for column ‘po_no’ at row 32022”)

I Have applied this

ALTER TABLE tabSales Invoice Modify column po_no longtext;
mysqlcheck -u root -p --auto-repair --check --all-databases

Hi @Shaid_Azmin .

I face the same issue. Could you solve it?

You can change fieldtype from customize form.

A fix for this is in works

1 Like

Yeah, I have resolve the issue by updating the filed value manually form Database