Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
blankie
c98096c1ed fix: include column name in _ensure_columns ALTER TABLE 2026-07-26 23:50:09 +00:00

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()}
for name, col_def in columns.items():
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():