@@ -16,7 +16,9 @@ CREATE TABLE outgoing_webhook_events_queue (
1616 ` initial_attempt_id` Nullable(String),
1717 ` status_code` Nullable(UInt16),
1818 ` delivery_attempt` LowCardinality(String),
19- ` created_at_timestamp` DateTime64(3 )
19+ ` created_at_timestamp` DateTime64(3 ),
20+ ` processor_merchant_id` Nullable(String),
21+ ` initiator_merchant_id` Nullable(String)
2022) ENGINE = Kafka SETTINGS kafka_broker_list = ' kafka0:29092' ,
2123kafka_topic_list = ' hyperswitch-outgoing-webhook-events' ,
2224kafka_group_name = ' hyper' ,
@@ -43,6 +45,8 @@ CREATE TABLE outgoing_webhook_events (
4345 ` delivery_attempt` LowCardinality(String),
4446 ` created_at` DateTime64(3 ),
4547 ` inserted_at` DateTime DEFAULT now() CODEC(T64, LZ4),
48+ ` processor_merchant_id` Nullable(String),
49+ ` initiator_merchant_id` Nullable(String),
4650 INDEX eventIndex event_type TYPE bloom_filter GRANULARITY 1 ,
4751 INDEX webhookeventIndex outgoing_webhook_event_type TYPE bloom_filter GRANULARITY 1
4852) ENGINE = MergeTree PARTITION BY toStartOfDay(created_at)
@@ -73,7 +77,9 @@ CREATE TABLE outgoing_webhook_events_audit (
7377 ` status_code` Nullable(UInt16),
7478 ` delivery_attempt` LowCardinality(String),
7579 ` created_at` DateTime64(3 ),
76- ` inserted_at` DateTime DEFAULT now() CODEC(T64, LZ4)
80+ ` inserted_at` DateTime DEFAULT now() CODEC(T64, LZ4),
81+ ` processor_merchant_id` Nullable(String),
82+ ` initiator_merchant_id` Nullable(String)
7783) ENGINE = MergeTree PARTITION BY merchant_id
7884ORDER BY
7985 (merchant_id, payment_id) TTL inserted_at + toIntervalMonth(18 ) SETTINGS index_granularity = 8192 ;
@@ -118,7 +124,9 @@ CREATE MATERIALIZED VIEW outgoing_webhook_events_mv TO outgoing_webhook_events (
118124 ` status_code` Nullable(UInt16),
119125 ` delivery_attempt` LowCardinality(String),
120126 ` created_at` DateTime64(3 ),
121- ` inserted_at` DateTime DEFAULT now() CODEC(T64, LZ4)
127+ ` inserted_at` DateTime DEFAULT now() CODEC(T64, LZ4),
128+ ` processor_merchant_id` Nullable(String),
129+ ` initiator_merchant_id` Nullable(String)
122130) AS
123131SELECT
124132 merchant_id,
@@ -139,7 +147,9 @@ SELECT
139147 status_code,
140148 delivery_attempt,
141149 created_at_timestamp AS created_at,
142- now() AS inserted_at
150+ now() AS inserted_at,
151+ processor_merchant_id,
152+ initiator_merchant_id
143153FROM
144154 outgoing_webhook_events_queue
145155WHERE
@@ -163,7 +173,9 @@ CREATE MATERIALIZED VIEW outgoing_webhook_events_audit_mv TO outgoing_webhook_ev
163173 ` status_code` Nullable(UInt16),
164174 ` delivery_attempt` LowCardinality(String),
165175 ` created_at` DateTime64(3 ),
166- ` inserted_at` DateTime DEFAULT now() CODEC(T64, LZ4)
176+ ` inserted_at` DateTime DEFAULT now() CODEC(T64, LZ4),
177+ ` processor_merchant_id` Nullable(String),
178+ ` initiator_merchant_id` Nullable(String)
167179) AS
168180SELECT
169181 merchant_id,
@@ -183,7 +195,9 @@ SELECT
183195 status_code,
184196 delivery_attempt,
185197 created_at_timestamp AS created_at,
186- now() AS inserted_at
198+ now() AS inserted_at,
199+ processor_merchant_id,
200+ initiator_merchant_id
187201FROM
188202 outgoing_webhook_events_queue
189203WHERE
@@ -249,4 +263,4 @@ SELECT
249263FROM
250264 outgoing_webhook_events_queue
251265WHERE
252- length(_error) > 0 ;
266+ length(_error) > 0 ;
0 commit comments