1

during setup:upgrade get an error

Module 'Magento_PurchaseOrder':

Unable to apply data patch Magento\PurchaseOrder\Setup\Patch\Data\InitPurchaseOrderSalesSequence for module Magento_PurchaseOrder. Original exception message: DDL statements are not allowed in transactions

1
  • did you tried to manually delete generated folder and then run di:compile and then s:up? – Pramod Aug 3 '20 at 4:08
0

DDL statements won't work in setup patch because now you need to use declarative schema(db_schema.xml) to run DB queries (i.e, table creation).

Reference: https://devdocs.magento.com/guides/v2.4/extension-dev-guide/declarative-schema/

1
  • Considering this is an error in a Magento module. The error must be in a different place – Matias Aug 7 '20 at 13:41
-1

You have to update your Magento B2B module, you can use these commands below, but first, change the composer.json to have the most updated version.

"magento/extension-b2b": "^1.2",

Then run:

composer update -vvv
bin/magento setup:upgrade
bin/magento cache:enable
bin/magento setup:static-content:deploy -f
bin/magento setup:di:compile
bin/magento maintenance:disable
2
  • Hi @Rafael Thank you for the answer. I changed the b2b version in my setup and run composer update. but it shows no new updates. and I run setup:upgrade command the issue is not resolved. – G-Developer Aug 6 '20 at 9:18
  • This doesn't work... – Matias Aug 7 '20 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.