feat(db): SQLite schema and movie migrations #48
Merged
naps62-yolo
merged 1 commits from 2026-08-22 19:36:40 +01:00
issue/4-db into main
Labels
Clear labels
area/api
area/ci
area/compat
area/core
area/daemon
area/db
area/dl
area/indexer
area/infra
area/meta
area/parse
area/probe
area/subs
area/web
difficulty/easy
difficulty/hard
difficulty/moderate
difficulty/trivial
phase/1-skeleton
phase/2-logic
phase/3-sourcing
phase/4-movies
phase/5-ui
phase/6-tv
phase/7-people
phase/8-compat
phase/9-subtitles
type/bug
type/chore
type/feature
type/test
arr-api
CI and test harness
arr-compat
arr-core
arr-daemon
arr-db
arr-dl
arr-indexer
workspace and tooling
arr-meta
arr-parse
arr-probe
arr-subs crate: providers, extraction, translation, sync
web/
bounded, obvious approach, few files
subtle correctness or cross-cutting
multiple files, judgement, an interface to design
one file, mechanical, no design decisions
workspace, CI, config, database, empty API and SPA
parsing and policy engine, pure, no network
TMDB and Prowlarr, read-only
movies end to end
search, buckets, library views, queues
seasons, episodes, tracking, derived status
owner tags and notifications
Jellyseerr shim
build order: subtitles, DESIGN.md §15
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: yolo/arr#48
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #4.
Movie side of the model in §4:
policies,roots,movies,media_files,releases,grabs,blacklist,owners,title_owners. No series tables —those are #34.
WAL,
foreign_keyson andsynchronous = NORMALare set inSqliteConnectOptions, not in a migration, since SQLite resetsforeign_keysper connection. Tables are
STRICT.Indices cover the four scans the reconcile loop makes, verified by query plan:
EXPLAIN QUERY PLAN
just db-resetrecreates the development database;just db-preparerefreshesthe committed
.sqlxdata, which is what keeps CI off a live database.just cipasses with
DATABASE_URLunset and nodev.dbpresent.Two things worth flagging. The 1080p size band is invented — §5.5 gives numbers
for 4K only, and §14 already marks all of them as placeholders. The
statecolumn is
missing | grabbed | imported, which is my reading of §7.3 and §8rather than something the design spells out; #7 owns the canonical enum and can
tighten the CHECK.
Reviewed
ac0d2a45e5b3bb2393407988d7175651fd5c9a0e. No findings.