AuditEvent: Delete type column (step 2)

Problem to solve

The AuditEvent model's type column always has the same value: SecurityEvent. That is useless information. Worse than useless, actually, because it's in one of the largest tables on gitlab.com so is adding unnecessary burden on resources there.

Further, the type column is reserved by Rails for polymorphic models, and GitLab strongly discourages use of polymorphic models.

Further details

This idea was initially discussed in another issue.

Proposal

Complete the ending steps of the procedure for dropping columns:

  • Release 2: drop the column
  • Release 3: remove ignore rule

Note: Release 1 stopped using the column:

  • Remove all writes to this field. (i.e. grep for SecurityEvent across the codebase)
  • Mark this field as ignore_column
Edited by Dan Jensen