fix: use named columns in tmdb_cache INSERT to handle migration column order
Docker / docker (push) Successful in 3m37s
Docker / docker (push) Successful in 3m37s
ALTER TABLE ADD COLUMN appends at the end of existing tables, but CREATE TABLE defines year before cached_at — positional VALUES mapped year→cached_at (NOT NULL). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -100,7 +100,7 @@ def lookup(arte_id: str, title: str, subtitle: str) -> dict | None:
|
|||||||
|
|
||||||
with sqlite3.connect(_DB) as conn:
|
with sqlite3.connect(_DB) as conn:
|
||||||
conn.execute(
|
conn.execute(
|
||||||
"INSERT OR REPLACE INTO tmdb_cache VALUES (?,?,?,?,?,?)",
|
"INSERT OR REPLACE INTO tmdb_cache (arte_id, tmdb_id, poster, backdrop, year, cached_at) VALUES (?,?,?,?,?,?)",
|
||||||
(arte_id, tmdb_id, poster, backdrop, year, datetime.now().isoformat()),
|
(arte_id, tmdb_id, poster, backdrop, year, datetime.now().isoformat()),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user