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:
21
prod/clickhouse/violet/11_fee_settled_events.sql
Normal file
21
prod/clickhouse/violet/11_fee_settled_events.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
-- 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.fee_settled_events
|
||||
(
|
||||
`ts` DateTime64(6, 'UTC'),
|
||||
`trade_id` String DEFAULT '',
|
||||
`fee` Float64 DEFAULT 0,
|
||||
`fee_asset` LowCardinality(String) DEFAULT 'USDT',
|
||||
`fee_source` LowCardinality(String) DEFAULT 'WS_SETTLED',
|
||||
`is_maker` UInt8 DEFAULT 0,
|
||||
`exchange_ts` Int64 DEFAULT 0,
|
||||
`realized_pnl_delta` Float64 DEFAULT 0,
|
||||
`runtime_namespace` LowCardinality(String) DEFAULT '',
|
||||
`strategy` LowCardinality(String) DEFAULT ''
|
||||
)
|
||||
ENGINE = MergeTree
|
||||
PARTITION BY toYYYYMM(ts)
|
||||
ORDER BY (trade_id, ts)
|
||||
SETTINGS index_granularity = 8192;
|
||||
Reference in New Issue
Block a user