Unserialize Error while updating to 2.3.5 from 2.1.13
I've attempted to upgrade from 2.1.13 directly to 2.3.5
I've worked through all the issues of updating via composer and am trying to run setup:upgrade but it is getting stuck at Module_UrlRewrite
I am getting the error:
Unable to apply data patch Magento\UrlRewrite\Setup\Patch\Data\ConvertSerializedDataToJson for module Magento_UrlRewrite. Original exception message: Error Converting field 'metadata' in table 'url_rewrite' where 'url_rewrite_id'= #####, ##### using Magento\Framework\DB\DataConverter\SerializedToJson.
Fix data or replace with valid value.
Failure Reason : 'Unable to unserialize value.'
Yes that is the correct step to resolve this issue.
Basically after 2.2.X released there is code level change is there in the native Magento specifically for this serialized and unserialize functions and that's the reasons developers are facing this issue.
This is a known issue and setting up the meta data and sales_order_data table value as empty will resolve this issue.