Summary
I'm currently in the process of upgrading a project from 4.1.12 CE to 4.2.5 however I'm getting the following when running oro:platform:update
> Oro\Bundle\CheckoutBundle\Migrations\Schema\v1_12\RemoveAlternativeCheckoutWorkflow
ERROR: An exception occurred while executing 'SELECT e.id FROM oro_checkout e INNER JOIN oro_workflow_item wi ON (CAST(wi.entity_id as integer) = e.id) AND (wi.entity_class = ?) WHERE wi.workflow_name = ?' with params ["Oro\\Bundle\\CheckoutBundle\\Entity\\Checkout", "b2b_flow_alternative_checkout"]:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'integer) = e.id) AND (wi.entity_class = 'Oro\\Bundle\\CheckoutBundle\\Entity\\Ch' at line 1
This looks to be caused by the cast on line 60 of Oro\Bundle\WorkflowBundle\Migration\RemoveWorkflowAwareEntitiesQuery which I believe for Mysql 8.0 should either be removed or changed to CAST(wi.entity_id as UNSIGNED)
Happy to create a PR to make the change just wanted to confirm it was needed first.
Steps to reproduce
Start with a OroCommerce CE 4.1.12 project
Upgrade to 4.2.5
Perform oro:platform:update
Actual Result
Migrations fail with:
> Oro\Bundle\CheckoutBundle\Migrations\Schema\v1_12\RemoveAlternativeCheckoutWorkflow
ERROR: An exception occurred while executing 'SELECT e.id FROM oro_checkout e INNER JOIN oro_workflow_item wi ON (CAST(wi.entity_id as integer) = e.id) AND (wi.entity_class = ?) WHERE wi.workflow_name = ?' with params ["Oro\\Bundle\\CheckoutBundle\\Entity\\Checkout", "b2b_flow_alternative_checkout"]:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'integer) = e.id) AND (wi.entity_class = 'Oro\\Bundle\\CheckoutBundle\\Entity\\Ch' at line 1
Summary
I'm currently in the process of upgrading a project from 4.1.12 CE to 4.2.5 however I'm getting the following when running oro:platform:update
This looks to be caused by the cast on line 60 of Oro\Bundle\WorkflowBundle\Migration\RemoveWorkflowAwareEntitiesQuery which I believe for Mysql 8.0 should either be removed or changed to
CAST(wi.entity_id as UNSIGNED)
Happy to create a PR to make the change just wanted to confirm it was needed first.
Steps to reproduce
oro:platform:update
Actual Result Migrations fail with:
Expected Result
Migrations complete successfully
Details about your environment
Additional information
Current workaround is to require https://packagist.org/packages/oro/commerce-demo-checkouts so the migration does not run.