mirror of
https://github.com/tiennm99/miti99bot.git
synced 2026-09-10 04:20:01 +00:00
refactor(portfolio): retire completed migrations
This commit is contained in:
@@ -101,14 +101,11 @@ Successful GIF replies include the result behind Telegram spoiler formatting.
|
||||
> counts and creates indexes on startup. Deleted legacy command rows are
|
||||
> retained with `deleted: true`; `/stats` queries filter those rows from visible
|
||||
> results. A historical `system` collection may remain in MongoDB with completed
|
||||
> migration records. Stock stores cash as `vnd`; coin stores cash as `usd`.
|
||||
> Both embed positions as
|
||||
> `assets.<symbol>.{quantity,base,dividendCheckedAt}`. On every startup, enabled
|
||||
> paper-trading modules verify this shape and migrate the previous flat
|
||||
> `assets`/`costBasis` documents before Telegram handlers are installed. The bot
|
||||
> intentionally fails startup if validation or a migration write fails.
|
||||
> Completed records remain in `system` as audit history, but do not suppress
|
||||
> later invariant scans.
|
||||
> migration records. Stock stores cash as `vnd` and embeds positions as
|
||||
> `assets.<symbol>.{quantity,base,dividendCheckedAt}`. Coin stores cash as `usd`
|
||||
> and embeds positions as `assets.<symbol>.{quantity,base}`. Completed migration
|
||||
> records remain in `system` as audit history; the completed one-time migration
|
||||
> code no longer runs at startup.
|
||||
|
||||
## 2. Coolify
|
||||
|
||||
|
||||
Reference in New Issue
Block a user