From 9049383e87f4e018d7e17a0d26b69e64aa32d013 Mon Sep 17 00:00:00 2001 From: Repinoid Date: Sat, 6 Jun 2026 06:16:00 +0400 Subject: [PATCH] =?UTF-8?q?feat:=20device=5Fuuid=20=E2=80=94=20UUID=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B8=D0=BB=D0=BE=D0=B6=D0=B5=D0=BD=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=B2=20SharedPreferences?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/db.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/api/db.py b/api/db.py index 5de5648..6028e04 100644 --- a/api/db.py +++ b/api/db.py @@ -97,7 +97,8 @@ class Database: android_version TEXT, android_sdk INTEGER, app_version TEXT, - android_id TEXT, + android_id TEXT, + device_uuid TEXT, -- ELM327 elm_mac TEXT, @@ -139,6 +140,7 @@ class Database: CREATE INDEX IF NOT EXISTS idx_sessions_mac ON sessions(elm_mac); CREATE INDEX IF NOT EXISTS idx_sessions_aid ON sessions(android_id); CREATE INDEX IF NOT EXISTS idx_sessions_request_id ON sessions(request_id); + CREATE INDEX IF NOT EXISTS idx_sessions_uuid ON sessions(device_uuid); """) self.conn.commit() @@ -189,7 +191,7 @@ class Database: INSERT OR IGNORE INTO sessions ( client_ip, real_ip, user_agent, content_length, phone_model, phone_maker, android_version, android_sdk, - app_version, android_id, + app_version, android_id, device_uuid, elm_mac, elm_bt_name, obd_protocol, vin, dtc_count, pid_count, duration_ms, response_count, error_count, @@ -198,13 +200,14 @@ class Database: diagnosis_text, diagnosis_len, llm_model, llm_duration_ms, llm_success, raw_responses, request_id, response_json - ) VALUES (?,?,?,?, ?,?,?,?, ?,?, ?,?,?, ?,?,?, ?,?,?, ?,?,?, ?,?, - ?,?,?, ?,?, ?,?,?) + ) VALUES (?,?,?,?, ?,?,?,?, ?,?, ?,?,?, ?,?,?, ?,?,?, ?,?,?, ?,?,, + ?,?,?, ?,?, ?,,?) """, ( ci.get("client_ip"), ci.get("real_ip"), ci.get("user_agent"), ci.get("content_length"), ci.get("phone_model"), ci.get("phone_maker"), ci.get("android_version"), ci.get("android_sdk"), ci.get("app_version"), ci.get("android_id"), + ci.get("device_uuid"), ci.get("elm_mac"), ci.get("elm_bt_name"), ci.get("obd_protocol"), vin, dtc_count, pid_count, ci.get("duration_ms"), len(responses), ci.get("error_count", 0),