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>
This commit is contained in:
Aaron Kimbrell
2026-09-29 18:40:22 -05:00
parent b67e0ba9ba
commit 7bc41f2246
18 changed files with 371 additions and 7 deletions

View File

@@ -381,6 +381,9 @@ class TestSQLDatabase : public GameDatabase {
void InsertChatFlagEvent(const ChatFlagEvent& event) override {}
std::vector<ChatFlagEvent> GetChatFlagEvents(uint64_t flagId) override { return {}; }
std::vector<std::pair<uint64_t, uint64_t>> GetFlaggedMessages(const std::vector<uint64_t>& messageIds) override { return {}; }
void RecordClientSysInfo(const SysInfoRow& info) override {}
std::vector<SysInfoRow> GetClientSysInfo(uint32_t accountId, uint32_t limit) override { return {}; }
std::vector<SysInfoRow> GetLatestClientSysInfo(uint32_t limit) override { return {}; }
void InsertModerationDecision(const std::string& kind, int64_t subjectId, const std::string& subject, bool approved, const std::string& reason, int64_t time) override {}
nlohmann::json GetModerationDecisions(const std::string& kind, int64_t subjectId, uint32_t limit) override { return nlohmann::json::array(); }
Totp GetTotp(uint32_t accountId) override { return {}; }