Create migrations and model changes for filtering group level audit events by projects and groups
Database schema
Previous suggesion
Create following 2 tables for storing the information related to the filter added:
- audit_events_streaming_group_http_group_filter
- Attributes:
- external_audit_event_destination_id
- namespace_id (group_id)
- Deletion of row if the corresponding destination or group gets deleted.
- Composite unique index on external_audit_event_destination_id and namespace_id columns.
- Attributes:
- audit_events_streaming_group_http_project_filter
- Attributes:
- external_audit_event_destination_id
- project_id
- Deletion of row if the corresponding destination or project gets deleted.
- Composite unique index on external_audit_event_destination_id and project_id columns.
- Attributes:
Actual implementation
We have moved to a single table as using namespaces(group and project) is what some teams are working towards, so the new database schema is:
- audit_events_streaming_http_group_namespace_filters
- Attributes:
- external_audit_event_destination_id
- namespace_id (for group and project namespace)
- Deletion of row if the corresponding destination or namespace gets deleted.
- Unique indexes on external_audit_event_destination_id and namespace_id columns.
- Attributes:
Edited by Hitesh Raghuvanshi