diff --git a/supabase/migrations/031_fix_profiles_update_rls.sql b/supabase/migrations/034_fix_profiles_update_rls.sql similarity index 89% rename from supabase/migrations/031_fix_profiles_update_rls.sql rename to supabase/migrations/034_fix_profiles_update_rls.sql index 131ab94..50bd634 100644 --- a/supabase/migrations/031_fix_profiles_update_rls.sql +++ b/supabase/migrations/034_fix_profiles_update_rls.sql @@ -1,7 +1,14 @@ -- ============================================================ --- 031_fix_profiles_update_rls.sql — lock down privilege columns +-- 034_fix_profiles_update_rls.sql — lock down privilege columns -- on profiles (GHSA-fg5p-2qc3-jmxr, C1) -- +-- NOTE: renamed from 031 → 034 to resolve a duplicate migration version. +-- The 031 slot was already taken by 031_ai_reply_slot_grant.sql (#345), +-- so shipping this as 031 too made a clean `supabase db` apply fail with +-- a duplicate schema_migrations key (SQLSTATE 23505). This migration is +-- idempotent (DROP POLICY IF EXISTS / CREATE OR REPLACE) and independent +-- of the AI tables, so re-sequencing it after 033 is safe. +-- -- The problem -- -- The `profiles_update` RLS policy from migration 017 gates on