Skip to content

Commit 13f8b85

Browse files
committed
docs(plan): add implementation note about SQL migration refinements
Add a note clarifying that the SQL snippets in the plan represent the initial design. Reference the actual shipped migrations which include additional refinements like idempotent triggers, date validation constraints, and improved RLS policies.
1 parent 2577d82 commit 13f8b85

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

docs/plans/2026-01-24-twelve-step-program-implementation.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@
1212

1313
---
1414

15+
> **Implementation Note:** The SQL snippets in this plan represent the initial design.
16+
> The shipped migrations in `supabase/migrations/20260124*.sql` include additional
17+
> refinements made during implementation:
18+
>
19+
> - `valid_month_day` CHECK constraint in `daily_readings` to validate date combinations
20+
> - Idempotent trigger statements (`DROP TRIGGER IF EXISTS ... CREATE TRIGGER`)
21+
> - `step_number`/`category` consistency CHECK in `prayers` table
22+
> - Numeric range CHECKs in `literature_books` and `literature_chapters`
23+
> - `WITH CHECK` clauses on UPDATE policies for complete RLS coverage
24+
> - Index on `user_prayer_history` for efficient queries
25+
>
26+
> **Always reference the actual migration files for the authoritative schema.**
27+
28+
---
29+
1530
## Phase 1: Database Schema & Types
1631

1732
### Task 1.1: Create Database Migration for Daily Readings Tables

0 commit comments

Comments
 (0)