fixed _ensure_columns bug

This commit is contained in:
blankie 2026-07-26 16:58:58 -07:00
parent 4207cd7f31
commit 527f8b5947

View file

@ -142,7 +142,7 @@ def _ensure_columns(db, table, columns):
existing = {r[1] for r in db.execute(f"PRAGMA table_info({table})").fetchall()} existing = {r[1] for r in db.execute(f"PRAGMA table_info({table})").fetchall()}
for name, col_def in columns.items(): for name, col_def in columns.items():
if name not in existing: if name not in existing:
db.execute(f"ALTER TABLE {table} ADD COLUMN {col_def}") db.execute(f"ALTER TABLE {table} ADD COLUMN {name} {col_def}")
def init_db(): def init_db():