Upgrading from 3.1.2.1 to 3.3.0.4 database problem with 1406 Data too long

I figured out the issue. In the 3.1.x database the column with name of label in issue-galleys table is declared as a VARCHAR(255) while in 3.2.x database it is VARCHAR(32). Coincidently I have entries which were more than 32 characters in length hence the error.

Solution
On the 3.1.x database, I corrected the entries by: -
Identified the the offending entries by running
SELECT galley_id, label, CHAR_LENGTH(label) AS labelLength FROM issue_galleys WHERE CHAR_LENGTH(label) > 32;

For each offending entry I truncated the value via an update
UPDATE issue_galleys SET label = ‘{my truncated value}’ WHERE galley_id = {galley_id_value};

Cheers
Nason

1 Like