Release 1.6
This commit is contained in:
26
app/cli.py
26
app/cli.py
@@ -30,6 +30,32 @@ def _ensure_schema_and_settings() -> None:
|
||||
db.session.execute(db.text("ALTER TABLE display ADD COLUMN show_overlay BOOLEAN NOT NULL DEFAULT 0"))
|
||||
db.session.commit()
|
||||
|
||||
# Optional ticker tape (RSS headlines)
|
||||
if "ticker_enabled" not in display_cols:
|
||||
db.session.execute(db.text("ALTER TABLE display ADD COLUMN ticker_enabled BOOLEAN NOT NULL DEFAULT 0"))
|
||||
db.session.commit()
|
||||
if "ticker_rss_url" not in display_cols:
|
||||
db.session.execute(db.text("ALTER TABLE display ADD COLUMN ticker_rss_url VARCHAR(1000)"))
|
||||
db.session.commit()
|
||||
if "ticker_color" not in display_cols:
|
||||
db.session.execute(db.text("ALTER TABLE display ADD COLUMN ticker_color VARCHAR(32)"))
|
||||
db.session.commit()
|
||||
if "ticker_bg_color" not in display_cols:
|
||||
db.session.execute(db.text("ALTER TABLE display ADD COLUMN ticker_bg_color VARCHAR(32)"))
|
||||
db.session.commit()
|
||||
if "ticker_bg_opacity" not in display_cols:
|
||||
db.session.execute(db.text("ALTER TABLE display ADD COLUMN ticker_bg_opacity INTEGER"))
|
||||
db.session.commit()
|
||||
if "ticker_font_family" not in display_cols:
|
||||
db.session.execute(db.text("ALTER TABLE display ADD COLUMN ticker_font_family VARCHAR(120)"))
|
||||
db.session.commit()
|
||||
if "ticker_font_size_px" not in display_cols:
|
||||
db.session.execute(db.text("ALTER TABLE display ADD COLUMN ticker_font_size_px INTEGER"))
|
||||
db.session.commit()
|
||||
if "ticker_speed" not in display_cols:
|
||||
db.session.execute(db.text("ALTER TABLE display ADD COLUMN ticker_speed INTEGER"))
|
||||
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"))
|
||||
|
||||
Reference in New Issue
Block a user