Change Freshbooks Classic Invoice.Lines field to be MEDIUMTEXT instead of TEXT

  • 81Views
  • Last Post 20 April 2021
0
votes
Jason Ables posted this 17 April 2021

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.

Order By: Standard | Newest | Votes
0
votes
Jason Ables posted this 17 April 2021

If it helps, a recent Run ID that shows where these errors occurred is 55736118.

0
votes
Nataliia Nikulina posted this 20 April 2021

Hello Jason,  

 

Thank you for contacting the Skyvia team.
We have passed your request to our developer team and will contact you as soon as we have any updates.  

 

Best regards,
Nataliia

Close