Files
Showy/docs-vault/Database.md
T

22 lines
807 B
Markdown

# Database
## Overview
MySQL database named "Showzy", managed by Sequelize ORM. Schema sync uses `{ alter: doUpdate }` where `doUpdate = false` by default.
## Key Models
- `Entry` — Movies and TV series
- `Season` — TV seasons (belongs to Entry)
- `Episode` — TV episodes (belongs to Season)
- `EntrySeen` — Movie watch records (has `accuracy` field: EXACT, ESTIMATED, UNKNOWN)
- `EpisodeSeen` — Episode watch records (has `accuracy` field: EXACT, ESTIMATED, UNKNOWN)
- `Media` — Image file references (posters, logos, backdrops, stills)
- `Collection`, `Genre`, `Network`, `People`, `Credit`, `Franchise`
## Important Files
- `backend/config/database.js` — Connection config
- `backend/config/relations.js` — Model associations
- `backend/models/` — All Sequelize model definitions