classAddAuditEvent<ActiveRecord::Migrationdefchangecreate_table:audit_eventsdo|t|t.integer:author_id,null: falset.string:type,null: false# "Namespace" where the change occurs# eg. On a project, group or usert.integer:entity_id,null: falset.string:entity_type,null: false# Details for the eventt.text:detailst.timestampsendadd_index:audit_events,:author_idadd_index:audit_events,:typeadd_index:audit_events,[:entity_id,:entity_type]endend