6 plans across 3 waves covering market-aware pricing, exchange rates, community price data, and currency-normalized display. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3.9 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous, requirements, must_haves
| phase | plan | type | wave | depends_on | files_modified | autonomous | requirements | must_haves | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 33-currency-system | 02 | execute | 1 |
|
|
true |
|
|
Purpose: [BLOCKING] Schema push — database must match code before any API work can proceed. Without this, TypeScript types pass (from config) but runtime queries fail. Output: Migration SQL applied to database.
<execution_context> @$HOME/.claude/get-shit-done/workflows/execute-plan.md @$HOME/.claude/get-shit-done/templates/summary.md </execution_context>
@.planning/PROJECT.md @.planning/STATE.md @.planning/phases/33-currency-system/33-01-SUMMARY.md Task 1: [BLOCKING] Generate and push database migration drizzle-pg/ src/db/schema.ts, drizzle.config.ts Run Drizzle migration generation and push:-
Generate migration:
bun run db:generate- This reads src/db/schema.ts and produces a SQL migration file in drizzle-pg/
- Expected: creates new migration for market_prices table, community_prices table, and new columns on items/thread_candidates
-
Apply migration:
bun run db:push- Applies the generated migration to the PostgreSQL database
- Verify by checking that the migration was applied without errors
-
Verify tables exist by running a quick query or checking the migration output
Note: Drizzle ORM detected, push command is bun run db:push (per project CLAUDE.md). Non-TTY compatible — no interactive prompts expected.
<acceptance_criteria>
- A new migration SQL file exists in drizzle-pg/ containing CREATE TABLE market_prices
- A new migration SQL file exists in drizzle-pg/ containing CREATE TABLE community_prices
- Migration SQL contains ALTER TABLE items ADD COLUMN price_currency
- Migration SQL contains ALTER TABLE thread_candidates ADD COLUMN found_price_cents
- bun run db:push exits with code 0
</acceptance_criteria>
cd /home/jlmak/Projects/jlmak/GearBox && ls drizzle-pg/*.sql | tail -1 | xargs grep -c "market_prices|community_prices"
Database schema matches Drizzle definitions — all new tables and columns exist in the live database
<threat_model>
Trust Boundaries
| Boundary | Description |
|---|---|
| None | Schema migration is an internal operation with no external trust boundaries |
STRIDE Threat Register
| Threat ID | Category | Component | Disposition | Mitigation Plan |
|---|---|---|---|---|
| T-33-05 | Tampering | migration SQL | accept | Migrations are generated from code and applied by the developer — no external input |
| </threat_model> |
<success_criteria>
- Database has market_prices and community_prices tables
- items table has price_currency column
- thread_candidates table has found_price_cents, found_price_currency, found_price_date columns </success_criteria>