Fix: PRAGMA cursor muss fetchall() vor iteration

This commit is contained in:
Dotty Dotter 2026-04-10 23:34:55 +02:00
parent e6e8787df8
commit 3e7154720b

View File

@ -64,7 +64,8 @@ async def init_db():
""")
# Migration: drucksache-Spalte zu jobs (für Queue-Resume nach Restart)
cols = {r[1] for r in await db.execute("PRAGMA table_info(jobs)")}
cursor = await db.execute("PRAGMA table_info(jobs)")
cols = {r[1] for r in await cursor.fetchall()}
if "drucksache" not in cols:
await db.execute("ALTER TABLE jobs ADD COLUMN drucksache TEXT")