feat: Update ClickHouse table creation with ReplacingMergeTree and DateTime64
This commit is contained in:
parent
f9c8d43a86
commit
7b6d890d7e
@ -82,8 +82,8 @@ def create_trading_plan_table():
|
||||
id UInt32,
|
||||
plan_name String,
|
||||
status String,
|
||||
created_at DateTime,
|
||||
updated_at DateTime,
|
||||
created_at DateTime64(3),
|
||||
updated_at DateTime64(3),
|
||||
|
||||
timeframe String,
|
||||
market_focus String,
|
||||
@ -123,9 +123,8 @@ def create_trading_plan_table():
|
||||
fundamental_criteria Nullable(String),
|
||||
options_strategy_details Nullable(String)
|
||||
)
|
||||
ENGINE = MergeTree()
|
||||
PRIMARY KEY (id)
|
||||
ORDER BY (id, created_at)
|
||||
ENGINE = ReplacingMergeTree(updated_at)
|
||||
ORDER BY (id)
|
||||
"""
|
||||
client.execute(query)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user