Similar to #2939324: Numeric value out of range: 1264 Out of range value for column [error] 'shopify_collection_id_value' at row 1, which addresses this issue for the D7 branch. Opening a separate issue so we can work on the D7 and D8 fixes in parallel, rather than hijacking that issue with a D8 patch.
Also split off from #2945205: Drupal\Core\Entity\EntityStorageException: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'inventory_quantity' at row 1, which started as a similar issue on the inventory quantity property, but later on included a (partial) fix for the shopify collection ID field. Since these are two separate items (one is about the quantity base field on the shopify_product_variant entity, the other is about the shopify_collection_id configurable field on taxonomy terms), I think it's preferable to handle them in separate issues.
The fix for the collections in #2945205: Drupal\Core\Entity\EntityStorageException: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'inventory_quantity' at row 1 was only a partial fix: it addresses main field table, but not the revision table, and does not use the proper API to update the tables (directly alters the database structure instead of using the Update API (#3029997: New Entity Update API for converting the schema of a content entity type, with or without pre-existing data).
Attached patch should properly address the change to the shopify_collection_id field.
Comments
Comment #2
bobbygryzyngerMoves the post-update hook to a
shopify.post_update.phpfile to prevent patch conflicts.Comment #4
bobbygryzyngerComment #5
bobbygryzyngerStill seeing an issue here in a site status report:
The attached patch also updates the site's configuration object for the field and moves the database storage updates back to a
hook_update_Nfunction (where it was in the original patch).Comment #6
bobbygryzyngerSetting storage to unsigned as well to match installation configuration.
Comment #7
bobbygryzyngerUpdates hook function label.
Comment #9
bobbygryzynger