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:
parent
5f70f13da3
commit
bfe437857b
9 changed files with 1080 additions and 20 deletions
|
|
@ -4,16 +4,18 @@ services:
|
|||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- candle-data:/app/data
|
||||
- ml-data:/app/ml-data
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- DATABASE_URL=postgresql://ml_user:ml_password@postgres:5432/candle_annotator
|
||||
- INFERENCE_API_URL=http://ml-service:8001
|
||||
- INFERENCE_API_TIMEOUT=30000
|
||||
- INFERENCE_BATCH_TIMEOUT=120000
|
||||
- NEXT_PUBLIC_PREDICTIONS_ENABLED=true
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
ml-service:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
|
|
@ -32,7 +34,7 @@ services:
|
|||
- mlflow-data:/app/mlruns
|
||||
environment:
|
||||
- MLFLOW_TRACKING_URI=http://mlflow:5000
|
||||
- DATABASE_URL=postgresql://ml_user:ml_password@postgres:5432/ml_db
|
||||
- DATABASE_URL=postgresql://ml_user:ml_password@postgres:5432/candle_annotator
|
||||
- PYTHONUNBUFFERED=1
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
|
|
@ -70,16 +72,18 @@ services:
|
|||
environment:
|
||||
- POSTGRES_USER=ml_user
|
||||
- POSTGRES_PASSWORD=ml_password
|
||||
- POSTGRES_DB=ml_db
|
||||
- POSTGRES_DB=candle_annotator
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ml_user -d ml_db"]
|
||||
test: ["CMD-SHELL", "pg_isready -U ml_user -d candle_annotator"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
candle-data:
|
||||
ml-data:
|
||||
mlflow-data:
|
||||
postgres-data:
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue