Skip to the content.

ADR-006: Separate OpsEventLog from Tenant AuditLog

Date: 2026-03-19 Status: Accepted

Context

The existing AuditLog model uses a constrained ACTION_CHOICES field (create, update, delete) designed for tenant-scoped data operations. The ops dashboard required logging of authentication events (ops_login, ops_login_failed, otp_setup, otp_verified, otp_failed, ops_logout) which do not fit this schema.

Options considered:

  1. Extend AuditLog.ACTION_CHOICES with ops event types
  2. Add a free-text detail field to AuditLog
  3. Create a separate OpsEventLog model in the ops_dashboard app

Decision

Create a separate OpsEventLog model in the ops_dashboard app with its own EVENT_CHOICES, ip_address, detail, and timestamp fields.

Rationale

Consequences