Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: db migration for integration events (#7604)
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: - Success ✅ - Failed ❌ - SuccessWithErrors⚠️ - `state_details`: Expands on the previous column with more details, as text. Examples: - OK. Status code: 200 - Status code: 429 - Rate limit reached - No access token provided - `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: - Webhook: Request body - Slack App: Message text and an array with all the channels we're posting to 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 existing `addons` table.
- Loading branch information