Introduction to the UNIQUE_IDENTIFIER_ACTIVITY_LOG Table
The UNIQUE_IDENTIFIER_ACTIVITY_LOG table is designed to track activity logs associated with unique identifiers. This table plays a crucial role in maintaining a comprehensive record of actions and changes related to unique identifiers within the Serial system.Table Structure
The UNIQUE_IDENTIFIER_ACTIVITY_LOG table is structured to capture detailed information about each activity log entry. Here’s a detailed breakdown of its columns:| Column Name | Data Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | Unique identifier for each activity log entry |
| unique_identifier_id | uuid | foreign key | Reference to the associated unique identifier |
| user_id | uuid | foreign key | ID of the user who performed the action |
| company_id | uuid | foreign key | ID of the company associated with the action |
| timestamp | timestamp | not null | Timestamp of when the activity occurred |
| action | text | not null | Description of the action performed |
Usage and Functionality
The UNIQUE_IDENTIFIER_ACTIVITY_LOG table is designed to be a comprehensive audit trail for unique identifier-related activities. Here are some key points about its usage:- Tracking Changes: The table records various actions performed on unique identifiers, allowing for a detailed history of modifications and interactions.
- User Accountability: By linking each entry to a specific user and company, the system maintains accountability for all actions taken on unique identifiers.
- Time-based Analysis: The timestamp column enables temporal analysis of activities, which can be useful for auditing and understanding usage patterns over time.
Notes
- The table uses UUIDs for primary and foreign keys, ensuring unique identification across the system.
- An index on the unique_identifier_id column is created to optimize queries filtering or joining on this field.
-
Row-level security policies are implemented to control access for authenticated users. For example:
- Similar policies exist for insert, update, and delete operations, with additional checks for admin roles where necessary.

