v1
This commit is contained in:
@@ -31,6 +31,11 @@ def init_db_command(admin_email: str, admin_pass: str):
|
||||
if "description" not in display_cols:
|
||||
db.session.execute(db.text("ALTER TABLE display ADD COLUMN description VARCHAR(200)"))
|
||||
db.session.commit()
|
||||
|
||||
company_cols = [r[1] for r in db.session.execute(db.text("PRAGMA table_info(company)")).fetchall()]
|
||||
if "storage_max_bytes" not in company_cols:
|
||||
db.session.execute(db.text("ALTER TABLE company ADD COLUMN storage_max_bytes BIGINT"))
|
||||
db.session.commit()
|
||||
except Exception:
|
||||
# Best-effort; if it fails we continue so fresh DBs still work.
|
||||
db.session.rollback()
|
||||
|
||||
Reference in New Issue
Block a user