fixed _ensure_columns bug
This commit is contained in:
parent
4207cd7f31
commit
527f8b5947
1 changed files with 1 additions and 1 deletions
|
|
@ -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():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue