Skip to main content

Database Schema

The core data is stored in MySQL 8. The schema is designed for multi-tenancy (Schools/Stables).

Entity Relationship

Key Tables

TableDescription
usersApp users (Trainers, Admins).
camerasStores RTSP URL, IP address, and credentials.
alertsHistorical log of incidents (Type: STRESSED, CAST, U_DOWN).
metricsTime-series data points (agitation score, velocity) inserted by the Vision system.

Migration Strategy: We use node ace migration:run to apply changes. Never edit the DB schema manually.