feat(db): flag episodes that vanish upstream
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
-- #122. TMDB deletes and renumbers episodes. An episode that vanished
|
||||||
|
-- upstream and has no file is deleted outright by the refresh; one that has
|
||||||
|
-- a file is never deleted — `media_files.path` is UNIQUE and its owner is
|
||||||
|
-- polymorphic, so dropping the row would orphan a real file — and instead
|
||||||
|
-- carries this flag as the conflict the operator resolves.
|
||||||
|
ALTER TABLE episodes ADD COLUMN vanished INTEGER NOT NULL DEFAULT 0
|
||||||
|
CHECK (vanished IN (0, 1));
|
||||||
Reference in New Issue
Block a user