From 4070214fe7e46f4d63e6282c475678aba3038942 Mon Sep 17 00:00:00 2001 From: Leo Date: Sat, 23 May 2026 17:26:13 -0400 Subject: [PATCH] v5 migration: add dex_report_date and install_date columns to assets table --- admin_server.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/admin_server.py b/admin_server.py index c7eaaf1..17979c1 100644 --- a/admin_server.py +++ b/admin_server.py @@ -330,6 +330,11 @@ def init_db(conn: sqlite3.Connection): conn.execute("ALTER TABLE assets ADD COLUMN longitude REAL DEFAULT NULL") if "geofence_radius_meters" not in asset_cols: conn.execute("ALTER TABLE assets ADD COLUMN geofence_radius_meters INTEGER DEFAULT 50") + # v5 migration: dex_report_date + install_date + if "dex_report_date" not in asset_cols: + conn.execute("ALTER TABLE assets ADD COLUMN dex_report_date TEXT DEFAULT NULL") + if "install_date" not in asset_cols: + conn.execute("ALTER TABLE assets ADD COLUMN install_date TEXT DEFAULT NULL") cursor = conn.execute("PRAGMA table_info(locations)") loc_cols = {row[1] for row in cursor.fetchall()} if "latitude" not in loc_cols: