You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Performing craft commerce/upgrade I get a database error:
Migrating address data…
Deleted 1 addresses that were not used in orders or customer addresses.
[=========================================================> ] 45% (94/206) ETA: n/aException 'yii\db\Exception' with message 'SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'field_addressNotes_nxprammy' at row 1
The SQL being executed was: INSERT INTO content (elementId, title, siteId, dateCreated, dateUpdated, uid, field_addressAttention_ntgbaazz, field_addressAddress3_lrxlvxzm, field_addressPhone_fsxsdspy, field_addressNotes_nxprammy) VALUES (9627, 'Address', 1, '2021-12-18 18:02:01', '2021-12-18 18:02:01', 'ba14c703-8805-4d98-9b99-cea53ee30231', 'REDACTED', 'REDACTED', '+REDACTED', 'REDACTED')'
in /var/www/html/vendor/yiisoft/yii2/db/Schema.php:676
Error Info:
Array
(
[0] => 22001
[1] => 1406
[2] => Data too long for column 'field_addressNotes_nxprammy' at row 1
)
Caused by: Exception 'PDOException' with message 'SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'field_addressNotes_nxprammy' at row 1'
in /var/www/html/vendor/yiisoft/yii2/db/Command.php:1320
The length of the redacted field was 285. I think this should be a longer text field in the migration.
Steps to reproduce
Have a notes field with content longer than the column supports
Run craft commerce/upgrade
Expected behavior
Migration to finish correctly.
Actual behavior
Throws exception
Craft CMS version
4.10.3
Craft Commerce version
4.6.3.1
PHP version
8.3
Operating system and version
No response
Database type and version
MariaDB
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered:
The issue is because in commerce_addresses the notes field is set to the type text where the column that is created is set to varchar(255) inside content table.
What happened?
Description
Performing craft commerce/upgrade I get a database error:
Migrating address data…
Deleted 1 addresses that were not used in orders or customer addresses.
[=========================================================> ] 45% (94/206) ETA: n/aException 'yii\db\Exception' with message 'SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'field_addressNotes_nxprammy' at row 1
The SQL being executed was: INSERT INTO
content
(elementId
,title
,siteId
,dateCreated
,dateUpdated
,uid
,field_addressAttention_ntgbaazz
,field_addressAddress3_lrxlvxzm
,field_addressPhone_fsxsdspy
,field_addressNotes_nxprammy
) VALUES (9627, 'Address', 1, '2021-12-18 18:02:01', '2021-12-18 18:02:01', 'ba14c703-8805-4d98-9b99-cea53ee30231', 'REDACTED', 'REDACTED', '+REDACTED', 'REDACTED')'in /var/www/html/vendor/yiisoft/yii2/db/Schema.php:676
Error Info:
Array
(
[0] => 22001
[1] => 1406
[2] => Data too long for column 'field_addressNotes_nxprammy' at row 1
)
Caused by: Exception 'PDOException' with message 'SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'field_addressNotes_nxprammy' at row 1'
in /var/www/html/vendor/yiisoft/yii2/db/Command.php:1320
The length of the redacted field was 285. I think this should be a longer text field in the migration.
Steps to reproduce
Expected behavior
Migration to finish correctly.
Actual behavior
Throws exception
Craft CMS version
4.10.3
Craft Commerce version
4.6.3.1
PHP version
8.3
Operating system and version
No response
Database type and version
MariaDB
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: