fix: add pnl_pct and capital_invested migration for trade_entry_prices

Both columns were referenced in queries (reliability, Kelly, calibration,
backtest) but missing from the ALTER TABLE migration block, causing
sqlite3.OperationalError: no such column: pnl_pct on existing VPS DBs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
OpenSquared
2026-06-17 21:52:50 +02:00
parent 97ba36454b
commit 8446876eb0

View File

@@ -205,6 +205,8 @@ def init_db():
("trade_score", "REAL"),
("matched_profile", "TEXT"),
("last_seen_at", "TEXT"),
("pnl_pct", "REAL"),
("capital_invested", "REAL"),
]:
try:
c.execute(f"ALTER TABLE trade_entry_prices ADD COLUMN {col} {definition}")