Leave a comment at the end of this page or email contact@krishagni.com
Error "Data truncation: Data too long for column"
This error occurs when an input value exceeds the maximum size limit set for a column or field. It can happens during data synchronization from REDCap or OpenClinica, especially if the field type in REDCap or OpenClinica is later changed (e.g., from text to textarea) after the project has already been synchronized in OpenSpecimen.
To fix the error:
Login to the database.
Increase the size of the column based on your need. You can find the details of table and column name from os.log.
ALTER TABLE <table_name> MODIFY COLUMN <column_name> VARCHAR(<desired_max_length>);
Alternatively, if the required maximum size is unknown or highly variable, change the column to MEDIUMTEXT:
ALTER TABLE <table_name> MODIFY COLUMN <column_name> MEDIUMTEXT;
Rerun the synchronization for the record in REDCap or OpenClinica.
Leave a comment at the end of this page or email contact@krishagni.com