refactor: remove completed one-time startup migrations

Production data is migrated and every marker is recorded in the system
collection, so the stock dividend-history, sticker legacy-pack and stats
stock_dividend migrations no longer do anything. Stats keeps its startup
index creation and still hides retired stock_dividend rows.
This commit is contained in:
tiennm99 committed 2026-10-08 10:35:21 +07:00
1 parent 5344111787
commit 5e96490254
13 files changed
+31 -1030

No files matched your search

+3 -7
View File
@@ -149,13 +149,9 @@ MP4, with the same text fallback.
- **`coin`** stores cash as `usd` and embeds positions as
`assets.<symbol>.{quantity,base}`.
- **`system`** holds one marker per completed one-time startup migration. Keep
those records as audit history. The current markers are
`migration:stats-delete-stock-dividend-v1` (retires historical
`/stock_dividend` stats rows without erasing them),
`migration:stock-dividend-history-v1` (removes the retired dividend cursor
and hashed applied-event ledger), and
`migration:sticker-drop-legacy-packs-v1` (removes records left by the retired
per-user sticker pack commands).
those records as audit history. No one-time migration runs at startup now;
the completed ones were removed from the code once production data was
verified migrated.
## 2. Coolify
+1 -6
View File
@@ -6,12 +6,7 @@ storage, and no per-user packs.
**The module stores nothing.** Its factory ignores the collection it is handed:
the pack comes from the environment and the set owner from `OWNER_ID`, so there
is nothing per-user to key. A one-time startup cleanup
(`migration:sticker-drop-legacy-packs-v1`) removes the records the retired
per-user pack commands left in the `sticker` collection — pack documents keyed
by owner ID, `slug:` name reservations, and `pending-delete:` confirmations.
It is marker-guarded, so it scans once per database and never touches anything
written afterwards.
is nothing per-user to key.
| Command | Parameters | Reply to | What it does |
|---|---|---|---|