feat: Migrationen für campaigns-Tabellen (PostgreSQL) und email_events (ClickHouse)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-17 08:57:37 +00:00
parent 3c3088e66b
commit 5a144e0ce4
2 changed files with 53 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
CREATE TABLE IF NOT EXISTS newsletter.email_events (
event_type LowCardinality(String),
tenant_id String,
campaign_id UUID,
recipient_hash String,
timestamp DateTime64(3, 'UTC'),
metadata Map(String, String)
)
ENGINE = MergeTree()
PARTITION BY toYYYYMM(timestamp)
ORDER BY (tenant_id, campaign_id, event_type, timestamp);