When extensions do upgrades and add fields to tables, trigger-based logging tables require the extension to do the right thing
This isn't technically a bug, but following on from chat, it was discovered that there might be several extensions that make database updates in upgraders but don't rebuild logging tables the same way core does after core upgrades (https://github.com/civicrm/civicrm-core/blob/5.22.1/CRM/Upgrade/Form.php#L794), leading to missing log table fields. So the question came up of what part of the system should do that.
Is it:
- a core issue,
- a civix issue,
- something that just requires a developer documentation update.
Core
It seems it's by design that all core does is start a queue, and run the upgrades the extension provides. See https://github.com/civicrm/civicrm-core/blob/5.22.1/CRM/Admin/Page/ExtensionsUpgrade.php#L16. The corresponding CRM_Extension_Upgrades class is equally sparse. So this seems intentional to leave it up to the extension to do everything it needs to.
Civix
There's an argument it can't be up to civix to enforce because you don't technically need civix to write extensions. At the same time, that's how everyone makes extensions, so maybe the template that civix generates should be updated to add some info/examples.
Side note: The template should probably also encourage using functions like addColumn(). https://github.com/civicrm/civicrm-core/blob/5.22.1/CRM/Upgrade/Incremental/Base.php#L140
Dev docs
Probably there could be a docs update. Maybe at
https://docs.civicrm.org/dev/en/latest/extensions/civix/#generate-upgrader
or