See also:
-
Naming inconsistency: an identically named method
addCommitCallback()is called BEFORE a commit in the\Magento\Framework\DB\Transactionclass, but AFTER a commit in the\Magento\Framework\Model\ResourceModel\AbstractResourceclass. - How to fix the «DDL statements are not allowed in transactions» failure.