Database Schema
The core data is stored in MySQL 8. The schema is designed for multi-tenancy (Schools/Stables).
Entity Relationship
Key Tables
| Table | Description |
|---|---|
| users | App users (Trainers, Admins). |
| cameras | Stores RTSP URL, IP address, and credentials. |
| alerts | Historical log of incidents (Type: STRESSED, CAST, U_DOWN). |
| metrics | Time-series data points (agitation score, velocity) inserted by the Vision system. |
Migration Strategy: We use
node ace migration:runto apply changes. Never edit the DB schema manually.