Remove db migration
This commit is contained in:
@@ -108,9 +108,3 @@ def get_db():
|
||||
def init_db() -> None:
|
||||
os.makedirs(DATA_DIR, exist_ok=True)
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user