# activity_log ## Purpose The **activity_log** table stores events and historical records regarding both physical and virtual access within the facility. It is used to maintain an audit trail of personnel actions, SCP-related incidents, location events, and other significant operational activities. The table serves as the primary source of historical event data for investigations, reporting, and system monitoring. ## Columns | Field | Type | Description |-------------|-------------|-----------------------------------------------------------| | id_act_log | BIGINT | Unique activity log identifier (PK, AUTO_INCREMENT) | id_per | MEDIUMINT | Personnel identifier associated with the event (FK, NULLABLE) | id_scp | MEDIUMINT | SCP identifier associated with the event (FK, NULLABLE) | id_loc | SMALLINT | Location identifier associated with the event (FK, NULLABLE) | type | VARCHAR(100)| Category or type of logged activity | description | TEXT | Detailed description of the recorded event | timestamp | DATETIME | Timestamp when the event occurred |---------------------------------------------------------------------------------------| ## Relationships - References **personnel.id_per** through **id_per** to optionally associate an activity with a staff member. - References **scp.id_scp** through **id_scp** to optionally associate an activity with a specific SCP entity. - References **location.id_loc** through **id_loc** to optionally associate an activity with a physical facility location. ## Rules - At least one contextual reference (`id_per`, `id_scp`, or `id_loc`) should be provided whenever applicable. - Log entries are unalterable and should not be modified after creation. ## Example output (with \G operator) *************************** 1. row *************************** id_act_log: 1 id_per: 21 id_scp: 8 id_loc: NULL type: access_denied description: Personnel attempted to access SCP records without sufficient clearance. timestamp: 2026-06-27 14:45:17