mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-07-06 18:01:22 +02:00
Remove automatic telemetry querying, remove battery pane, add telemetry history pane
This commit is contained in:
committed by
Jack Kingsman
parent
87df4b4aa1
commit
c808f0930b
+2
-10
@@ -3109,16 +3109,14 @@ async def _migrate_049_foreign_key_cascade(conn: aiosqlite.Connection) -> None:
|
||||
|
||||
|
||||
async def _migrate_050_repeater_telemetry_history(conn: aiosqlite.Connection) -> None:
|
||||
"""Create repeater_telemetry_history table and add tracking opt-in column to app_settings."""
|
||||
"""Create repeater_telemetry_history table for JSON-blob telemetry snapshots."""
|
||||
await conn.execute(
|
||||
"""
|
||||
CREATE TABLE IF NOT EXISTS repeater_telemetry_history (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
public_key TEXT NOT NULL,
|
||||
timestamp INTEGER NOT NULL,
|
||||
battery_volts REAL NOT NULL,
|
||||
uptime_seconds INTEGER,
|
||||
noise_floor_dbm INTEGER,
|
||||
data TEXT NOT NULL,
|
||||
FOREIGN KEY (public_key) REFERENCES contacts(public_key) ON DELETE CASCADE
|
||||
)
|
||||
"""
|
||||
@@ -3129,10 +3127,4 @@ async def _migrate_050_repeater_telemetry_history(conn: aiosqlite.Connection) ->
|
||||
ON repeater_telemetry_history (public_key, timestamp)
|
||||
"""
|
||||
)
|
||||
try:
|
||||
await conn.execute(
|
||||
"ALTER TABLE app_settings ADD COLUMN telemetry_tracked_keys TEXT DEFAULT '[]'"
|
||||
)
|
||||
except Exception:
|
||||
pass # Column may already exist
|
||||
await conn.commit()
|
||||
|
||||
Reference in New Issue
Block a user