Disclose database migrations and Supabase config#130
Conversation
|
Note: RLS strategy conflict with PR #145 This PR proposes fine-grained per-user RLS policies for These are philosophically incompatible. In Postgres, permissive policies combine with OR, so if both land, this PR's allow-policies would silently nullify #145's deny-all for Current state on The existing codebase uses no frontend direct Supabase queries — all data access goes through the backend API via service role. This means:
A decision on which model to adopt should be made before either PR is merged to avoid silent policy conflicts. |
PR Review: Disclose database migrations and Supabase configSummaryThis PR discloses a batch of database migrations (baseline through account-deletion-jobs) and Supabase config, as part of the downstream AGPL disclosure series. The centrepiece security change is Risk Assessment
Branch Health
Review by CategoryArchitecture — RLS Strategy Conflict with PR #145
Security
Correctness
PR Size
PostgreSQL Checklist
Issue Lifecycle
Verdict
What I Verified
|
Part of the downstream AGPL disclosure. This PR isolates database migration and Supabase configuration changes for easier review.
Scope
Migration System
node-pg-migratescripts for migrating up, rolling back one migration, and creating new migrations.backend/schema.sqlsetup path.Schema Changes
Security and Account Lifecycle
Fresh Database Setup
backend/migrations/000_one_shot_schema.sqlfor fresh Supabase databases.supabase/config.tomlandsupabase/.gitignorefor local Supabase CLI workflows.Environment Updates
DATABASE_URLusage for migration execution.Review Note