feat: add Python migration script and successfully test SQLite to PostgreSQL data migration

- Created scripts/migrate-sqlite-to-postgres.py as alternative to TypeScript version
- Handles all type conversions: timestamps, booleans, and JSONB fields
- Successfully migrated all 2,836 rows from SQLite to PostgreSQL
- Verified data integrity: all 6 tables migrated correctly
- Charts: 1, Candles: 2,592, Annotations: 4, Span annotations: 223
This commit is contained in:
Marko Djordjevic 2026-02-17 14:01:21 +01:00
parent 5f70f13da3
commit bfe437857b
9 changed files with 1080 additions and 20 deletions

View file

@ -8,6 +8,9 @@ import { eq, desc } from 'drizzle-orm';
*
* Export span annotations in ML pipeline format (JSON).
*
* @deprecated The ML service now queries annotations directly from PostgreSQL.
* This endpoint is retained for data backup and external analysis purposes only.
*
* Query params:
* - chartId: (optional) specific chart ID. If omitted, uses most recent chart.
* - format: (optional) 'json' (default) or 'csv'