Prepare for tracking label add/remove events for issues/mrs/epics
- Prepare backend to track label changes explicitly in the system, as events
- Don't enable events creation yet, this will be enabled as part of #48483 (closed)) and switching system notes to events will be easier (see #47993 (comment 90719804))
- Applies to project labels and group labels.
Applies to issues and merge requests and epics.
In each event, track the following:
- Who made the change.
- The label (a project label or a group label).
- The associated object, i.e. the issue, mr, or the epic.
- The timestamp.
This is for any new events.
Previous changes will not be considered. (I.e. we don't need to try to reconstruct previous changes and migrate them to the db.)
Use cases this should support
- This will be used to support a new way to present system notes. These are tracked in these separate issues.
- This will be used to support future improvements to email notifications, and possibly todos.
- It should handle label promotions gracefully.
- It should handle issues being moved gracefully.
- It should handle projects being deleted gracefully.
- This will be used to support doing VSM, i.e. gitlab-ee#6323. In particular, see this discussion on label promotions and VSM: #47993 (comment 82944694).