fix(types): add delivery_version to webhooks + webhook_deliveries (main typecheck broken)#2298
Conversation
Pre-existing types drift on main — migration 20260518121000_standard_webhook_secrets.sql added `delivery_version` columns to both tables but neither supabase.types.ts (backend nor frontend copy) was regenerated. Main's typecheck has been broken since that migration merged; our PR caught it because we run typecheck in CI. Surgical additions to keep the diff scoped and avoid the unrelated drift a full `supabase gen types` would introduce. Same approach we used for ai_analyzed earlier in this PR.
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThis PR extends Supabase database TypeScript type definitions to include a new ChangesWebhook Schema Extensions
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Merging this PR will not alter performance
Comparing Footnotes
|
|



Main is currently red
Run: https://github.com/Cap-go/capgo/actions/runs/26091284919/job/76718009686
Root cause
Migration 20260518121000_standard_webhook_secrets.sql added
delivery_versioncolumns to bothwebhooksandwebhook_deliveriestables. The webhook code (Vue components, edge functions, triggers, utils) was updated to reference these columns. But neithersupabase.types.ts(backend nor frontend copy) was regenerated alongside the migration, so the type system doesn't know the column exists.This broke main's typecheck. Because typecheck is part of
build_and_deploy.yml, the consequence is downstream:supabase_deploy✗ (typecheck failure)deploy_webapp/deploy_files/deploy_api/ Plugin / Translation deploys ⏭ (all skipped)So the AI build analytics feature that just merged in #2284 has NOT actually deployed to prod yet, and won't until typecheck is green.
Fix
Surgical additions to both supabase.types.ts copies —
delivery_version: stringon the Row,delivery_version?: stringon Insert + Update (it has aDEFAULT 'legacy'so it's optional), for bothwebhooksandwebhook_deliveries. Same approach we used forai_analyzedearlier — avoids the unrelated drift a fullsupabase gen typesregen would introduce.8 simple field additions, +12 lines / -0 lines.
Test plan
bun typecheck)build_and_deploy.ymlreachesApply Supabase Migrationsand downstream deploys succeedSummary by CodeRabbit