fix: Update ClickHouse table creation syntax for trading plans
This commit is contained in:
parent
34c006e360
commit
f9c8d43a86
@ -79,7 +79,7 @@ def create_trading_plan_table():
|
||||
with create_client() as client:
|
||||
query = """
|
||||
CREATE TABLE IF NOT EXISTS trading_plans (
|
||||
id Int32,
|
||||
id UInt32,
|
||||
plan_name String,
|
||||
status String,
|
||||
created_at DateTime,
|
||||
@ -99,8 +99,8 @@ def create_trading_plan_table():
|
||||
entry_confirmation String,
|
||||
position_sizing Float64,
|
||||
maximum_drawdown Float64,
|
||||
max_trades_per_day Int32,
|
||||
max_trades_per_week Int32,
|
||||
max_trades_per_day UInt32,
|
||||
max_trades_per_week UInt32,
|
||||
|
||||
total_risk_per_trade Float64,
|
||||
max_portfolio_risk Float64,
|
||||
@ -114,7 +114,7 @@ def create_trading_plan_table():
|
||||
real_trade_performance Nullable(String),
|
||||
|
||||
improvements_needed Nullable(String),
|
||||
strategy_version Int32,
|
||||
strategy_version UInt32,
|
||||
plan_author String,
|
||||
trade_review_notes Nullable(String),
|
||||
future_testing_ideas Nullable(String),
|
||||
@ -124,6 +124,7 @@ def create_trading_plan_table():
|
||||
options_strategy_details Nullable(String)
|
||||
)
|
||||
ENGINE = MergeTree()
|
||||
PRIMARY KEY (id)
|
||||
ORDER BY (id, created_at)
|
||||
"""
|
||||
client.execute(query)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user