feat(db): add enum values for every planned trigger provider up front

Merged
SA
3mo ago
+6990-1

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):

enumadded
automation_trigger_kindmicrosoft_teams, google_calendar, gmail, notion, circleback
integration_providersentry, microsoft_teams, google, notion
  • google is one connection provider (one OAuth serves both), while google_calendar and gmail are separate trigger kinds — different sentences, filters, and renewal cadences.
  • circleback is a trigger kind with no connection provider: the user configures the outbound webhook on Circleback's side, so there's no integration_connections row.

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 0083 adds:
    • automation_trigger_kind: microsoft_teams, google_calendar, gmail, notion, circleback
    • integration_provider: sentry, microsoft_teams, google, notion
  • Mirrors these in packages/db/src/schema/enums.ts Zod enums.
  • Modeling notes: google is one connection provider for both google_calendar and gmail; circleback is 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.