VIOLET V1a: dolphin_violet DDL set + statement-wise applier (applied + verified)
14 tables consolidated from the LIVE post-ALTER dolphin_pink schema (maras_tp + provenance folded into base CREATEs — a fresh DB never replays ALTER chains) + violet_feed_divergence (scan-vs-venue divergence metric, session_id + plane seqs + mono_ns). apply_violet_ddl.py posts ONE statement per HTTP request (multi-statement posts fail — proven on pink 08), is idempotent (all IF NOT EXISTS, double-apply tested live), and verifies the expected table set. Applied to live CH: verify all 14 present. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
37
prod/clickhouse/violet/07_status_snapshots.sql
Normal file
37
prod/clickhouse/violet/07_status_snapshots.sql
Normal file
@@ -0,0 +1,37 @@
|
||||
-- dolphin_violet DDL — consolidated from the LIVE dolphin_pink schema
|
||||
-- (post-ALTER: includes maras_tp + provenance columns). Generated 2026-06-12.
|
||||
-- Apply via apply_violet_ddl.py (one statement per HTTP POST).
|
||||
|
||||
CREATE TABLE IF NOT EXISTS dolphin_violet.status_snapshots
|
||||
(
|
||||
`ts` DateTime64(3, 'UTC'),
|
||||
`capital` Float64,
|
||||
`roi_pct` Float32,
|
||||
`dd_pct` Float32,
|
||||
`trades_executed` UInt16,
|
||||
`posture` LowCardinality(String),
|
||||
`rm` Float32,
|
||||
`vel_div` Float32,
|
||||
`vol_ok` UInt8,
|
||||
`phase` LowCardinality(String),
|
||||
`mhs_status` LowCardinality(String),
|
||||
`boost` Float32,
|
||||
`cat5` Float32,
|
||||
`conviction_multiplier` Float32 DEFAULT 0,
|
||||
`exchange_leverage` UInt8 DEFAULT 0,
|
||||
`exchange_leverage_mode` LowCardinality(String) DEFAULT '',
|
||||
`leverage_mapping_rule` LowCardinality(String) DEFAULT '',
|
||||
`account_capital` Float64 DEFAULT 0,
|
||||
`portfolio_capital` Float64 DEFAULT 0,
|
||||
`current_open_notional` Float64 DEFAULT 0,
|
||||
`current_account_leverage` Float32 DEFAULT 0,
|
||||
`remaining_notional_capacity` Float64 DEFAULT 0,
|
||||
`max_account_leverage` Float32 DEFAULT 0,
|
||||
`ledger_authority` LowCardinality(String) DEFAULT '',
|
||||
`capital_source` LowCardinality(String) DEFAULT '',
|
||||
`account_event_seq` UInt64 DEFAULT 0
|
||||
)
|
||||
ENGINE = MergeTree
|
||||
ORDER BY ts
|
||||
TTL toDateTime(ts) + toIntervalDay(180)
|
||||
SETTINGS index_granularity = 8192;
|
||||
Reference in New Issue
Block a user