Add name field to streaming audit events API
As part of a the update streaming audit event UI styles (Update streaming audit event UI styles (#411005 - closed)) there is a new field to add a name to a destination. This field to help users better distinguish between destinations.
Proposal
Add a field to the streaming audit events destination API called Name. This field is required to add a destination
Update to allow a name
field to be provided in the following qraphql queries:
- externalAuditEventDestinationCreate
- instanceExternalAuditEventDestinationCreate
- externalAuditEventDestinationUpdate
- instanceExternalAuditEventDestinationUpdate
Design
Implementation plan
First we can send database MR for both external audit event destination and instance external audit event destination and then we can send another MR to add name field in APIs.
For migration MR we can follow below implementation plan
- Introduce a new column name as a string, initially allowing for null values.
- Backfill the name field for existing records with the format "Destination_#{record_id}".
- Alter the name column to disallow null values.
- Add a unique index on the combination of namespace_id and name.
Edited by Harsimar Sandhu