feat(db): nullable unique series.tvdb_id

This commit is contained in:
Miguel Palhas
2026-08-23 16:32:25 +01:00
parent fa3f9cbd91
commit 46de061e68
@@ -0,0 +1,6 @@
-- Torznab `t=tvsearch` is addressed by TVDB id (§6.1); the title text query
-- is only the fallback. Nullable, because TMDB does not know one for every
-- series and #121 backfills it on refresh; unique when present so two rows
-- cannot claim the same show.
ALTER TABLE series ADD COLUMN tvdb_id INTEGER;
CREATE UNIQUE INDEX series_tvdb_id_unique ON series (tvdb_id) WHERE tvdb_id IS NOT NULL;