Open DRoppelt opened 3 years ago
to unblock the migration you can change it to 'CAST(wi.entity_id as unsigned integer)' here https://github.com/oroinc/platform/blob/4.2/src/Oro/Bundle/WorkflowBundle/Migration/RemoveWorkflowAwareEntitiesQuery.php#L60
Thank you, I did not expect an answer on the weekend!
That, similar to changing to SIGNED
, solved the issue and let me proceed with migration.
Aside from that blocker, migration went through smoothly from 4.1 to 4.2.
I assume that piece of code is postgres specific?
Not sure is it a direct Postgres query or the team expected doctrine to transform the query automatically. Anyway, it's a bug that we didn't discover because, on CI, we test an application upgrade with installed https://github.com/oroinc/commerce-demo-checkouts extension. As a result, the migration never runs. The team will check how to fix it on Monday.
Internal ticket id #BB-20466
I faced with exactly same error while updating to 4.2.5. My luck that I am not the first who had such problem. @anyt workaround helped
Hi, same issue on our project with Postgres. (4.2.10 EE) Do you have a solution of this issue ? please
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 unsigned integer) = e.id) AND (wi.entity_class = ?) WHERE wi.workflow_name = ?' with params ["Oro\Bundle\CheckoutBundle\Entity\Checkout", "b2b_flow_alternative_checkout"]: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "integer" LINE 1: ...orkflow_item wi ON (CAST(wi.entity_id as unsigned integer) =...
If you are using EE version, please report the issue to the customer support portal. As I see the issue should be already fixed in 4.2.10.
Hi guys,
I hope this is okay to submit a bug directly? I have not found a similar open/resolved bug yet.
I am trying to upgrade 4.1 to 4.2, using a mysql database (community edition)
Summary
Upgrading 4.1 -> 4.2 with mysql
Steps to reproduce
Have an existing 4.1 installation Upgrade it to 4.2
Actual Result
Expected Result
php bin/console oro:platform:update
goes through with an upradeDetails about your environment
Additional information
I believe that this is the causing code: https://github.com/oroinc/platform/blob/master/src/Oro/Bundle/WorkflowBundle/Migration/RemoveWorkflowAwareEntitiesQuery.php#L60 (pinned to commit: https://github.com/oroinc/platform/blob/1ef3de1172608b0d5689cc7f5e6c16e0e661901f/src/Oro/Bundle/WorkflowBundle/Migration/RemoveWorkflowAwareEntitiesQuery.php#L60)
When I use the failing query (and substitute ? with random values) the query fails within HeidiSql as well:
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 = 2) WHERE wi.workflow_name = 2
But works as following:
SELECT e.id FROM oro_checkout e INNER JOIN oro_workflow_item wi ON (CAST(wi.entity_id as SIGNED) = e.id) AND (wi.entity_class = 2) WHERE wi.workflow_name = 2