Proposal: Change/Remove the Initialization action for trigger-based logging
Question
What's the purpose of the "Initialization" action for trigger-based logging? See https://github.com/civicrm/civicrm-core/blob/5.23.0/CRM/Logging/Schema.php#L820
Statement of problem
-
Suppose you have a million activity records. Then you enable logging. Now you have a million new records that are never referenced again
-
In the context of case activity revisions, these initializations are NOT actually the first revision when you go to switch to trigger-based logging. In fact they're the opposite. This is coming up for me while working on https://lab.civicrm.org/extensions/caseactivityrevisionmigrator
Proposal
Either:
-
If the purpose is simply to mark the start of logging, you could do this with a log_civicrm_meta table that just stores one record per table when you turn logging on about who did it, when, and which new logging table was created.
For extra it could also log who turned logging off and when.
OR
-
Just don't make any records period.
OR
-
Provide a hidden setting (it could be exposed, or not, doesn't matter) that if set then the system doesn't make the initialization records when you turn on logging.