Files
arr/crates/arr-db/migrations/0003_movie_releases.sql
T
naps62-yolo 99ac79373d
ci / web (push) Successful in 8s
e2e / e2e (push) Successful in 1m21s
ci / rust (push) Successful in 3m53s
feat(api): add movie CRUD API (#56)
2026-08-22 20:40:31 +01:00

10 lines
451 B
SQL

-- A release can be returned for more than one title search. Keep the cached
-- release itself unique by indexer/guid and record each movie association.
CREATE TABLE movie_releases (
movie_id INTEGER NOT NULL REFERENCES movies (id) ON DELETE CASCADE,
release_id INTEGER NOT NULL REFERENCES releases (id) ON DELETE CASCADE,
PRIMARY KEY (movie_id, release_id)
) STRICT;
CREATE INDEX movie_releases_release ON movie_releases (release_id);