-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
This issue is automatically created based on existing pull request: #33092: Prune triggers after setting database up properly
Description
When installing a new module which both installs tables and associated mview indexers, Magento fails to run setup:upgrade
successfully.
This is because there is a step within setup:upgrade
that's designed to prune old triggers from the database that happens before the new database state is established. The implementation detail of this prune is: remove all the known-good triggers, remove all other triggers, reinstate known-good triggers. It's the last step here that's causing issue. When this step tries to reinstate the "known-good" triggers, it's using the new code and therefore needs the new tables that haven't yet been created.
This pull request is a work-around for the problem described here. A proper fix would be to avoid unsubscribe/resubscribe of triggers within this prune step entirely.
Related Pull Requests
none
Fixed Issues
Manual testing scenarios
- Install Magento
- Set indexers to "Update by Schedule": php bin/magento indexer:set-mode schedule
- Add bug33092.tar.gz with tar xzf bug33092.tar.gz
- Enable the module with php bin/magento module:enable Magento_Bug33092
- Run php bin/magento setup:upgrade
- Witness error message / lack of error
Questions or comments
None
Contribution checklist
- Pull request has a meaningful description of its purpose
- All commits are accompanied by meaningful commit messages
- All new or changed code is covered with unit/integration tests (if applicable)
- README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
- All automated tests passed successfully (all builds are green)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status