feat(db): add enum values for every planned trigger provider up front
Why
Each trigger provider is about to be built by its own agent in its own workspace off a common base. If each one generated its own enum migration they'd all claim the next journal number and collide on merge — the failure we already hit with 0078 this session. Landing every enum value in one additive migration first means every provider becomes a code-only change on top.
What
Nine ADD VALUEs across two Postgres enums (0083):
| enum | added |
|---|---|
automation_trigger_kind | microsoft_teams, google_calendar, gmail, notion, circleback |
integration_provider | sentry, microsoft_teams, google, notion |
googleis one connection provider (one OAuth serves both), whilegoogle_calendarandgmailare separate trigger kinds — different sentences, filters, and renewal cadences.circlebackis a trigger kind with no connection provider: the user configures the outbound webhook on Circleback's side, so there's nointegration_connectionsrow.
Purely additive; nothing switches exhaustively on either enum (typecheck clean across all 38 packages). Safe to land before any of the code that uses these values.
After this merges
Spawn one workspace per provider off main: Slack, Linear, Circleback, raw webhook, Sentry, Teams, Google (Calendar + Gmail), Notion.
Summary by cubic
Pre-adds planned provider values to our Postgres enums so future provider PRs are code-only. Previously each provider would add its own enum migration and collide on journal numbers; now one additive migration avoids conflicts with no runtime behavior change.
- Migration
0083adds:automation_trigger_kind:microsoft_teams,google_calendar,gmail,notion,circlebackintegration_provider:sentry,microsoft_teams,google,notion
- Mirrors these in
packages/db/src/schema/enums.tsZod enums. - Modeling notes:
googleis one connection provider for bothgoogle_calendarandgmail;circlebackis a trigger kind with no connection provider. - Rollout: run the DB migration before branching provider workspaces. Additive only; no existing code paths require updates.
Summary by CodeRabbit
- New Features
- Added support for Sentry, Microsoft Teams, Google, and Notion integration providers.
- Added automation triggers for Microsoft Teams, Google Calendar, Gmail, Notion, and Circleback.