feat(db): add ai_analyzed flag to build_requests#2285
Conversation
Adds a boolean column with default FALSE used by the upcoming AI build analytics feature for one-analysis-per-job idempotency. Backward-compatible schema change — existing rows get the default; no app code on main reads or writes this column yet. The application code that consumes this column lands in PR #2284 (AI build analytics feature). This migration ships separately so the schema change can be reviewed and applied independently from the larger feature.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds a single database migration that introduces the Database Schema Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 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 unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 SQLFluff (4.1.0)supabase/migrations/20260518120000_add_ai_analyzed_to_build_requests.sqlUser Error: No dialect was specified. You must configure a dialect or specify one on the command line using --dialect after the command. Available dialects: Comment |
The ai_analyzed column migration is now in its own PR so the DB schema change can be reviewed and applied independently. This PR keeps the types update (supabase.types.ts) since edge function tests reference the new field name; the actual column is created by the migration in the standalone migration PR. Depends on #2285 being merged + the migration applied to the shared DB before this PR's runtime path works.
Merging this PR will not alter performance
Comparing Footnotes
|
|



Summary
Adds a single boolean column
ai_analyzed(NOT NULL, DEFAULT FALSE) onpublic.build_requests. Used by the upcoming AI build analytics feature for one-analysis-per-job idempotency.Why split out
This migration was originally part of PR #2284 (AI build analytics — adds CLI flag, edge function, and worker endpoint). It's split into its own PR so the DB schema change can be reviewed and applied independently from the feature code.
The feature PR will still merge after this one — the edge function in #2284 reads/writes the column, but no application code on `main` references it yet, so applying this migration ahead of feature code is safe.
Safety properties
Test plan
Summary by CodeRabbit