diff --git a/apps/backend/scripts/clickhouse-migrations.ts b/apps/backend/scripts/clickhouse-migrations.ts index f56870c00..15cb720dd 100644 --- a/apps/backend/scripts/clickhouse-migrations.ts +++ b/apps/backend/scripts/clickhouse-migrations.ts @@ -346,14 +346,19 @@ CREATE TABLE IF NOT EXISTS analytics_internal.email_outboxes ( created_with LowCardinality(String), email_draft_id Nullable(String), email_programmatic_call_template_id Nullable(String), + theme_id Nullable(String), is_high_priority UInt8, rendered_is_transactional Nullable(UInt8), rendered_subject Nullable(String), rendered_notification_category_id Nullable(String), + started_rendering_at Nullable(DateTime64(3, 'UTC')), + finished_rendering_at Nullable(DateTime64(3, 'UTC')), + render_error Nullable(String), scheduled_at DateTime64(3, 'UTC'), created_at DateTime64(3, 'UTC'), started_sending_at Nullable(DateTime64(3, 'UTC')), finished_sending_at Nullable(DateTime64(3, 'UTC')), + server_error Nullable(String), sent_at Nullable(DateTime64(3, 'UTC')), delivered_at Nullable(DateTime64(3, 'UTC')), opened_at Nullable(DateTime64(3, 'UTC')), @@ -361,8 +366,10 @@ CREATE TABLE IF NOT EXISTS analytics_internal.email_outboxes ( unsubscribed_at Nullable(DateTime64(3, 'UTC')), marked_as_spam_at Nullable(DateTime64(3, 'UTC')), bounced_at Nullable(DateTime64(3, 'UTC')), + delivery_delayed_at Nullable(DateTime64(3, 'UTC')), can_have_delivery_info Nullable(UInt8), skipped_reason LowCardinality(Nullable(String)), + skipped_details Nullable(String), send_retries Int32, is_paused UInt8, sync_sequence_id Int64, @@ -387,14 +394,19 @@ SELECT created_with, email_draft_id, email_programmatic_call_template_id, + theme_id, is_high_priority, rendered_is_transactional, rendered_subject, rendered_notification_category_id, + started_rendering_at, + finished_rendering_at, + render_error, scheduled_at, created_at, started_sending_at, finished_sending_at, + server_error, sent_at, delivered_at, opened_at, @@ -402,8 +414,10 @@ SELECT unsubscribed_at, marked_as_spam_at, bounced_at, + delivery_delayed_at, can_have_delivery_info, skipped_reason, + skipped_details, send_retries, is_paused FROM analytics_internal.email_outboxes diff --git a/apps/backend/src/lib/external-db-sync.ts b/apps/backend/src/lib/external-db-sync.ts index 519930537..336e1e8f0 100644 --- a/apps/backend/src/lib/external-db-sync.ts +++ b/apps/backend/src/lib/external-db-sync.ts @@ -566,6 +566,7 @@ const CLICKHOUSE_COLUMN_NORMALIZERS: Record