Remove db migration

This commit is contained in:
Ettore
2026-05-23 00:30:32 +02:00
parent bc18448be7
commit 01564a5953

View File

@@ -108,9 +108,3 @@ def get_db():
def init_db() -> None: def init_db() -> None:
os.makedirs(DATA_DIR, exist_ok=True) os.makedirs(DATA_DIR, exist_ok=True)
Base.metadata.create_all(bind=engine) Base.metadata.create_all(bind=engine)
# Lightweight migrations: add columns that may not exist in older databases
with engine.connect() as conn:
existing = {row[1] for row in conn.execute(text("PRAGMA table_info(keypasses)"))}
if "schedule" not in existing:
conn.execute(text("ALTER TABLE keypasses ADD COLUMN schedule TEXT"))
conn.commit()