Files
orangecat/scripts/db
Georgy ButaevandClaude Opus 4.8 391ae9c5d9 fix(events): currency-convention — rename mislabeled _btc price columns
events.ticket_price_btc / funding_goal_btc held amounts in the entity's chosen
`currency` (events has a currency column), NOT BTC — like products (price) and
services (fixed_price). The `_btc` suffix lied about the unit and would render a
50 CHF ticket as 50 BTC if any display code trusted it. The architecture doc
already specifies `ticket_price` in currency; the column names were the drift.

- migration: RENAME ticket_price_btc->ticket_price, funding_goal_btc->funding_goal
  (atomic, preserves data; events is currency-denominated, matching products/services)
- events route: drop the now-pointless _btc field mapping
- generated types: rename only the events block (research_entities.funding_goal_btc
  is genuinely BTC-native — no currency column — and stays)

Convention codified in the migration: prices -> nominal currency + neutral name;
donations/balances -> BTC + _btc suffix. assets.*_btc carry the same mislabel and
are a follow-up (their columns are read by display code -> needs its own change).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 13:40:31 +02:00
..