-- The season counterpart of episode_releases (0006). A targeted season search -- returns packs the operator has not committed to, which is the wrong grain -- for a table that links a release to one episode (DESIGN.md ยง9.3, issue 125). CREATE TABLE season_releases ( season_id INTEGER NOT NULL REFERENCES seasons (id) ON DELETE CASCADE, release_id INTEGER NOT NULL REFERENCES releases (id) ON DELETE CASCADE, PRIMARY KEY (season_id, release_id) ) STRICT; CREATE INDEX season_releases_release ON season_releases (release_id);