chore(events): remove EventsEnrichedExpanded model - #6441
Merged
Merged
Conversation
## Context The `events_enriched_expanded` ClickHouse table was introduced to feed `events_aggregated` through a materialized view. That view and its target table were dropped, leaving the expanded table without any consumer. The Rails side kept a model, a factory and a deletion path pointing at a table nothing reads anymore. ## Description Remove the `Clickhouse::EventsEnrichedExpanded` model along with its factory and spec, and stop fanning billable-metric deletions out to the table in `Events::DeleteForMetricService`. The ClickHouse schema is deliberately left untouched: the table, its Kafka queue and their migrations stay in place, so this change is reversible and carries no data loss. Dropping the schema is a separate decision. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
toommz
approved these changes
Sep 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
events_enriched_expandedwas introduced to feedevents_aggregatedthrough a materialized view.That view and its target table have since been dropped, so nothing reads the table anymore. The
Rails side still carries a model, a factory and a deletion path pointing at it.
Description
Clickhouse::EventsEnrichedExpandedmodel, its factory and its spec.events_enriched_expandedinEvents::DeleteForMetricService.The ClickHouse schema is left untouched on purpose: the table, its Kafka queue and their migrations
stay in place, so this carries no data loss and stays reversible. Dropping the schema, and with it
the now-idle
events_enriched_expanded_queueconsumer, is a separate call.🤖 Generated with Claude Code