Keep a missing date added as is when merging it into favorite_at

This commit is contained in:
AntsyLich
2026-10-12 13:56:32 +06:00
parent 07b9fb695c
commit 6dffca1593
2 changed files with 3 additions and 1 deletions
@@ -9,8 +9,9 @@ DROP INDEX library_favorite_index;
ALTER TABLE mangas ADD COLUMN favorite_at INTEGER;
-- favorite_modified_at is no fallback for a missing date_added: every manga update rewrote it
UPDATE mangas
SET favorite_at = coalesce(nullif(date_added, 0), favorite_modified_at * 1000, 0)
SET favorite_at = coalesce(date_added, 0)
WHERE favorite = 1;
ALTER TABLE mangas DROP COLUMN favorite;