I have 16 invoices that are failing in my replication with the following error:
"Data too long for column 'Lines' at row 1"
This is because the the Lines column on the Invoice table stores a JSON object representing all the lines of an invoice. Since some invoices can be well over 200 lines long, this creates an issue when storing this data in a standard TEXT field in MySQL, since the max number of characters with that data type is 65,535 characters.
My recommendation would be to at least change it to a MEDIUMTEXT field to allow for longer invoice lines to be stored.
For what it's worth, the character length of the longest invoice we had was 286,924 characters. For larger invoices that failed, the average character length of the invoice lines field was about 125,000 characters, which is nearly double the max length allowed for a standard TEXT field.
Switching to MEDIUMTEXT would allow for any sized invoice to be stored properly wtihout error.