audit_log
Audit trail for all CRUD operations
Записей: ~851
Колонки
| Колонка | Тип | Nullable | Default | Описание |
|---|---|---|---|---|
| id 🔑 | uuid | NOT NULL | uuid_generate_v4() | |
| user_id | uuid | NOT NULL | ||
| user_type | character varying(20) | NOT NULL | Type of user: staff or organization_user | |
| user_email | character varying(255) | NULL | ||
| action | character varying(20) | NOT NULL | ||
| entity_type | character varying(50) | NOT NULL | ||
| entity_id | character varying(255) | NULL | ||
| entity_name | character varying(255) | NULL | ||
| old_value | jsonb | NULL | Previous state of entity (for update/delete) | |
| new_value | jsonb | NULL | New state of entity (for create/update) | |
| ip_address | inet | NULL | ||
| user_agent | text | NULL | ||
| created_at | timestamp without time zone | NULL | CURRENT_TIMESTAMP |
🔑 = Primary Key, → = Foreign Key
Индексы
| Имя | Определение |
|---|---|
| audit_log_pkey | CREATE UNIQUE INDEX audit_log_pkey ON public.audit_log USING btree (id) |
| idx_audit_log_action | CREATE INDEX idx_audit_log_action ON public.audit_log USING btree (action) |
| idx_audit_log_created_at | CREATE INDEX idx_audit_log_created_at ON public.audit_log USING btree (create... |
| idx_audit_log_entity | CREATE INDEX idx_audit_log_entity ON public.audit_log USING btree (entity_typ... |
| idx_audit_log_entity_id | CREATE INDEX idx_audit_log_entity_id ON public.audit_log USING btree (entity_id) |
| idx_audit_log_entity_type | CREATE INDEX idx_audit_log_entity_type ON public.audit_log USING btree (entit... |
| idx_audit_log_user_id | CREATE INDEX idx_audit_log_user_id ON public.audit_log USING btree (user_id) |
| idx_audit_log_user_type | CREATE INDEX idx_audit_log_user_type ON public.audit_log USING btree (user_type) |