-
-
Notifications
You must be signed in to change notification settings - Fork 730
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: db migration for integration events #7604
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Manifest Files |
` | ||
CREATE TABLE IF NOT EXISTS integration_events | ||
( | ||
id SERIAL PRIMARY KEY NOT NULL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BIGSERIAL? we might be expecting more than 2B events here. Probably not, but moving to 8 bytes instead of 4 bytes here to never have to worry about it. Still going to give you a thumbsup, just something to consider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, addressed in ed64b1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider maybe using BIGSERIAL, but not a deal breaker for me. The rest of the table seems 👍
ed64b1f
to
18c49cc
Compare
https://linear.app/unleash/issue/2-2435/create-migration-for-a-new-integration-events-table
Adds a DB migration that creates the
integration_events
table:id
: Auto-incrementing primary key;integration_id
: The id of the respective integration (i.e. integration configuration);created_at
: Date of insertion;state
: Integration event state, as text. Can be anything we'd like, but I'm thinking this will be something like:state_details
: Expands on the previous column with more details, as text. Examples:event
: The whole event object, stored as a JSON blob;details
: JSON blob with details about the integration execution. Will depend on the integration itself, but for example:I think this gives us enough flexibility to cover all present and (possibly) future integrations, but I'd like to hear your thoughts.
I'm also really torn on what to call this table:
integration_events
: Consistent with the feature name. Addons are now called integrations, so this would be consistent with the new thing;addon_events
: Consistent with the existingaddons
table.