Add use_for_projections to events - #2230
Merged
Merged
Conversation
Schema-only PR for #2229. Adds the boolean (default true, null false) and a data migration seeding it from current behavior: events in concealed event groups start excluded, so introducing the flag changes nothing at rollout. The projection engine and event form changes follow in a separate PR once this has run in production. Relates to #2229 Co-Authored-By: Claude Fable 5 <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
Migration-only PR for #2229 (decoupling projection/planning data inclusion from event group concealment). No model or business logic — that comes in a follow-up PR after this has merged and run in production.
db/migrate: addsevents.use_for_projections, boolean,default: true, null: falsedb/data: backfillsuse_for_projections = falsefor events in concealed event groups, seeding the flag from the projection engine's current concealment predicate so its introduction is behavior-invisible; after the backfill the flag and concealment move independentlydb/schema.rb,db/data_schema.rb,erd.mmdregenerated by the migrationsThe backfill's
downis a deliberate no-op: the column default is the only prior state.Relates to #2229
Testing
bin/rails db:migrateandbin/rails data:migraterun clean locally (backfill flipped 1 event in the dev database's one concealed group)🤖 Generated with Claude Code