feat(stats): migrate command history

This commit is contained in:
2026-07-01 11:10:36 +07:00
parent cfbab24f68
commit f73c2c61ec
5 changed files with 309 additions and 15 deletions
+4 -1
View File
@@ -76,7 +76,10 @@ overrides are not supported in runtime env; modules use coded defaults.
> The `stats` collection uses queryable aggregate documents for command/user
> counts and creates indexes on startup. First startup after the schema change
> migrates legacy `count:`, `user:`, and `pair:` stats keys into the new shape,
> deletes the legacy keys, and records completion in `system`.
> deletes the legacy keys, and records completion in `system`. Startup also
> migrates renamed command stats to the current command names and marks removed
> command rows with `deleted: true`; `/stats` queries filter those retained
> legacy rows.
## 2. Coolify