feat: add postgres market time series schema
This commit is contained in:
@@ -385,6 +385,36 @@ Table engine_history.market_vs_engine_gap_history {
|
||||
// Schema: engine_history (V5 normalized learning history)
|
||||
// =============================================================================
|
||||
|
||||
Table quantengine.price_history_daily {
|
||||
ticker TEXT [not null]
|
||||
trade_date DATE [not null]
|
||||
open NUMERIC [not null]
|
||||
high NUMERIC [not null]
|
||||
low NUMERIC [not null]
|
||||
close NUMERIC [not null]
|
||||
volume BIGINT [not null]
|
||||
source TEXT [not null]
|
||||
collected_at TIMESTAMPTZ [not null, default: "NOW()"]
|
||||
provenance JSONB [not null, default: "'{}'::jsonb"]
|
||||
|
||||
indexes {
|
||||
(ticker, trade_date) [pk]
|
||||
}
|
||||
}
|
||||
|
||||
Table quantengine.macro_history_daily {
|
||||
symbol TEXT [not null]
|
||||
trade_date DATE [not null]
|
||||
value NUMERIC [not null]
|
||||
source TEXT [not null]
|
||||
collected_at TIMESTAMPTZ [not null, default: "NOW()"]
|
||||
provenance JSONB [not null, default: "'{}'::jsonb"]
|
||||
|
||||
indexes {
|
||||
(symbol, trade_date) [pk]
|
||||
}
|
||||
}
|
||||
|
||||
Table engine_history.source_observation {
|
||||
observation_id UUID [pk]
|
||||
observed_at TIMESTAMPTZ [not null]
|
||||
|
||||
Reference in New Issue
Block a user