Entity-Relationship Diagram
Derived from server/app/models/ via scripts/generatedbdocs.py. For per-table column
Database Migrations
Server schema is managed by Alembic. See ADR 0007 for the decision and its consequences. ADR 0002 describes the earlier hand-applied-DDL era and is superseded; it no longer describes how the server works.
Database Schema Overview
YLP-SAPOT (SAPOT Server) uses MariaDB as its database engine via SQLModel (an SQLAlchemy wrapper). The schema is applied by Alembic at deploy time (alembic upgrade head in server/runserver.sh), not created at application startup; createdband_tables() was removed from the FastAPI lifespan. See migrations.md for the workflow and ADR 0007 for the decision.
Database Tables Reference
Derived from server/app/models/ via scripts/generatedbdocs.py. For the ERD see