diff --git a/crates/arr-db/migrations/0016_series_tvdb_id.sql b/crates/arr-db/migrations/0016_series_tvdb_id.sql new file mode 100644 index 0000000..a893dc3 --- /dev/null +++ b/crates/arr-db/migrations/0016_series_tvdb_id.sql @@ -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;