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:
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user