feat(tradein/db): user_events table — unified login/IP audit + behavior event log #2515
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#2515
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/tradein-user-events-schema"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Что
Фундамент для фич 2 (учёт входов/IP + что ищут) и 3 (поведенческая аналитика): одна унифицированная append-only таблица
user_events.Воскрешает дизайн таблицы
audit_log(была в002_core_tables.sql, удалена в095_dead_schema.sqlкак неиспользуемая) — теперь она нужна ровно в той же форме.Схема
Индексы:
(username, created_at DESC),(event_type, created_at DESC),(ip_address),(created_at DESC).Решения продукта (подтверждены)
Свойства
IF NOT EXISTS), BEGIN/COMMIT. Auto-apply на деплое (strict exit-1).Следующие PR: request-audit middleware (capture IP/UA/username),
POST /api/v1/events, admin-дашборды/admin/audit+/admin/analytics.