fix: Rename 'order' column to 'order_ticket' to avoid SQL reserved keyword
SQL 'order' is a reserved keyword causing OperationalError. Renamed column to 'order_ticket' in both CREATE TABLE and INSERT statements. Fixes: OperationalError: near "order": syntax error
This commit is contained in:
1 parent
4f47b8e2fe
commit
c30e3e1a82
1 file changed
+2
-2
+2
-2
@@ -53,7 +53,7 @@ class MT5PnLTracker:
|
||||
CREATE TABLE IF NOT EXISTS mt5_deals (
|
||||
deal_id INTEGER PRIMARY KEY,
|
||||
ticket INTEGER,
|
||||
order INTEGER,
|
||||
order_ticket INTEGER,
|
||||
time TEXT,
|
||||
time_msc INTEGER,
|
||||
type INTEGER,
|
||||
@@ -171,7 +171,7 @@ class MT5PnLTracker:
|
||||
try:
|
||||
cursor.execute("""
|
||||
INSERT OR IGNORE INTO mt5_deals (
|
||||
deal_id, ticket, order, time, time_msc, type, entry,
|
||||
deal_id, ticket, order_ticket, time, time_msc, type, entry,
|
||||
magic, position_id, reason, volume, price, commission,
|
||||
swap, profit, fee, symbol, comment, external_id, imported_at
|
||||
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||||
|
||||
Reference in new issue
Block a user