Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: action_set_events db table migration #6298

Merged
merged 3 commits into from
Feb 21, 2024
Merged

Conversation

nunogois
Copy link
Member

@nunogois nunogois commented Feb 21, 2024

https://linear.app/unleash/issue/2-1962/implement-new-action-events-logic

Adds a new action_set_events table for the new action events logic.

Even though observable events are technically immutable, we're storing the observable event along with the action set event. This allows us to avoid 1 join while allowing us to persist action set event information after deleting observable events, if we wish to do so at a later stage.

Copy link

vercel bot commented Feb 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unleash-monorepo-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2024 1:58pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
unleash-docs ⬜️ Ignored (Inspect) Visit Preview Feb 21, 2024 1:58pm

Copy link
Contributor

@gastonfournier gastonfournier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor detail but looks good

action_set JSONB NOT NULL
);

CREATE INDEX IF NOT EXISTS idx_action_set_events_action_set_id ON action_set_events(action_set_id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This first index is redundant as Postgres can use the compound index (third one): idx_action_set_events_action_set_id_state.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, addressed in 5e63801

@nunogois nunogois merged commit 4a4d538 into main Feb 21, 2024
13 of 14 checks passed
@nunogois nunogois deleted the chore-db-action-set-events branch February 21, 2024 14:02
nunogois added a commit that referenced this pull request Feb 21, 2024
Follow up to: #6298

We no longer need this table, since it was superseded by `action_events`
and is no longer used.
I believe it's safe to drop this table right away since the feature is
not being used yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants