Files
DarkflameServer/migrations/dlu/sqlite/85_client_sysinfo.sql
Aaron Kimbrell 7bc41f2246 feat(db): client system info as reported by the client
client_sysinfo (migrations mysql 102, sqlite 85) keeps the system description
each account's client sent at login, exactly as sent, plus the physical memory
read from it. While nothing but the memory in use changes, the account's newest
row gets the new time and one more login; otherwise a new row starts. Log
pruning deletes rows not seen for a while (eLog::CLIENT_SYSINFO) and deleting
an account deletes its rows.

Tests on SQLite alone (dDatabaseSqliteTests) and in the MySQL parity tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:09:14 -05:00

25 lines
1.1 KiB
SQL

/* The system description clients send with their login request, as reported by the client. See the MySQL migration. */
CREATE TABLE IF NOT EXISTS client_sysinfo (
id INTEGER PRIMARY KEY AUTOINCREMENT,
account_id INTEGER NOT NULL,
first_seen BIGINT NOT NULL,
last_seen BIGINT NOT NULL,
logins INTEGER NOT NULL DEFAULT 1,
ip TEXT NOT NULL DEFAULT '',
client_os INTEGER NOT NULL DEFAULT 0,
memory_stats TEXT NOT NULL DEFAULT '',
memory_total_kb BIGINT NOT NULL DEFAULT 0,
video_card TEXT NOT NULL DEFAULT '',
number_of_processors INTEGER NOT NULL DEFAULT 0,
processor_type INTEGER NOT NULL DEFAULT 0,
processor_level INTEGER NOT NULL DEFAULT 0,
processor_revision INTEGER NOT NULL DEFAULT 0,
os_version_info_size INTEGER NOT NULL DEFAULT 0,
os_major_version INTEGER NOT NULL DEFAULT 0,
os_minor_version INTEGER NOT NULL DEFAULT 0,
os_build_number INTEGER NOT NULL DEFAULT 0,
os_platform_id INTEGER NOT NULL DEFAULT 0
);
CREATE INDEX IF NOT EXISTS client_sysinfo_account ON client_sysinfo (account_id, id);
CREATE INDEX IF NOT EXISTS client_sysinfo_last_seen ON client_sysinfo (last_seen);