feat(etl): add aggregate and milestone tables (parity 1A)#238
Open
raymondjacobson wants to merge 1 commit intoclaude/charming-rhodes-d6c7fefrom
Open
feat(etl): add aggregate and milestone tables (parity 1A)#238raymondjacobson wants to merge 1 commit intoclaude/charming-rhodes-d6c7fefrom
raymondjacobson wants to merge 1 commit intoclaude/charming-rhodes-d6c7fefrom
Conversation
First step toward parity with discovery-provider's trigger-driven aggregation. Migration 0017 adds: - aggregate_user (follower/following/track/repost/save/supporter counts) - aggregate_track / aggregate_playlist (repost + save counts) - aggregate_plays (lifetime listen count) + aggregate_monthly_plays - milestones (follower/save threshold milestones) Schema mirrors apps/packages/discovery-provider/ddl/migrations/0000_schema_failable.sql including the agg_user_follower_idx index added in apps#0126. No triggers or handler changes yet — those land in subsequent PRs in this stack (1B social triggers, 1C content triggers, 1D notifications, 1E secondary triggers). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
First step toward parity with discovery-provider's trigger-driven aggregation. Pure-DDL migration — no triggers, no handler changes.
Adds:
Schema mirrors apps/packages/discovery-provider/ddl/migrations/0000_schema_failable.sql including the `idx_aggregate_user_follower_count` index added in apps#0126.
Stack context
This is PR 1/5 in the trigger-port stack. Stacked on #237 (stems/remixes).
Test plan
🤖 Generated with Claude Code