read.markets/alembic/versions
Giorgio Gilestro a6d686324c models: align translation column naming + add token counts
Three recently-added tables (strategic_log_translations,
indicator_summary_translations, csv_format_templates) drifted from
the codebase's existing naming convention:
- llm_model -> model
- llm_cost_usd -> cost_usd
- content_md -> content  (on the two translation tables; csv_format
  doesn't have a content field)

Also added prompt_tokens and completion_tokens to the three tables;
they were silently dropped at write time despite LogResult exposing
them.

All writer call sites (ai_log_job, indicator_summary_job,
llm_csv_parser) and reader call sites (api.py localized helpers)
updated to match. Tests realigned.

Migration 0025 uses batch_alter_table for SQLite compatibility.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 21:18:29 +02:00
..
0001_initial_schema.py initial commit — cassandra v0.1 2026-05-15 21:56:10 +01:00
0002_position_name.py initial commit — cassandra v0.1 2026-05-15 21:56:10 +01:00
0003_log_tone_analysis.py initial commit — cassandra v0.1 2026-05-15 21:56:10 +01:00
0004_indicator_summaries.py add Eurostat + UK ONS sources; valuation/bubble/economy/bonds groups; aggregate read; market-open header 2026-05-15 23:07:42 +01:00
0005_widen_quote_symbol.py add Eurostat + UK ONS sources; valuation/bubble/economy/bonds groups; aggregate read; market-open header 2026-05-15 23:07:42 +01:00
0006_instrument_map.py phase B (1/4): CSV parser + InstrumentMap (T212 shortcode → Yahoo ticker) 2026-05-16 10:53:08 +01:00
0007_users.py phase A: user accounts + session-cookie auth 2026-05-16 11:12:10 +01:00
0008_email_otps.py phase G: data minimisation + passwordless auth + DeepSeek-first LLM 2026-05-18 14:16:57 +01:00
0009_ticker_universe.py phase G: data minimisation + passwordless auth + DeepSeek-first LLM 2026-05-18 14:16:57 +01:00
0010_drop_password.py phase G: data minimisation + passwordless auth + DeepSeek-first LLM 2026-05-18 14:16:57 +01:00
0011_drop_portfolio_tables.py phase G: data minimisation + passwordless auth + DeepSeek-first LLM 2026-05-18 14:16:57 +01:00
0012_headlines_tags.py news: auto-tag headlines + market-aware cadence + filter UI 2026-05-21 23:25:03 +01:00
0013_referrals.py phase D milestones 1+2: referral system + paid-access gate 2026-05-21 23:25:35 +01:00
0014_user_credit_until.py phase D milestones 1+2: referral system + paid-access gate 2026-05-21 23:25:35 +01:00
0015_portfolio_sync.py sync: encrypted cloud backup for portfolios + settings UX rework 2026-05-23 16:15:54 +02:00
0016_portfolio_sync_pepper_fp.py sync: detect orphaned blobs (pepper rotation) + fix AESGCM arg order 2026-05-25 12:49:11 +02:00
0017_email_digest.py db: drop redundant user_id index on email_sends 2026-05-25 22:55:33 +02:00
0018_polar_webhook.py polar: build /api/polar/webhook handler 2026-05-26 17:42:41 +02:00
0019_stripe.py stripe: wire checkout, customer portal, and webhook for read.markets 2026-05-26 18:45:13 +02:00
0020_trial_end.py stripe: per-cadence cooling-off + manage-subscription button 2026-05-26 20:06:19 +02:00
0021_csv_format_template.py alembic: use sa.text() for integer server_defaults in 0021 2026-05-27 12:06:05 +02:00
0022_localization.py alembic: add 0022 localization (users.lang + strategic_log_translations) 2026-05-27 16:53:27 +02:00
0023_lang_index_and_qd_symbol_widen.py alembic: 0023 — users.lang index + widen quotes_daily.symbol 2026-05-27 19:35:09 +02:00
0024_ind_summary_translations.py i18n: localize indicator summaries (per-group + aggregate read) 2026-05-27 20:19:47 +02:00
0025_align_translation_columns.py models: align translation column naming + add token counts 2026-05-27 21:18:29 +02:00