From e7ac4958313cc18bb9272d4ec4e8270eddf0bfe7 Mon Sep 17 00:00:00 2001 From: default Date: Fri, 5 Jun 2026 17:54:41 +0000 Subject: [PATCH] docs: explicit step to clean up test brands after restore The captured production data still includes 3 test brands (Sunrise, Green Valley, Orchard) created during the migration work. Promote the note in 'Notes' to a fully reproducible post-restore step with the exact DELETE statement and verification query. --- docs/SUPABASE_DUMP_GUIDE.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/SUPABASE_DUMP_GUIDE.md b/docs/SUPABASE_DUMP_GUIDE.md index 89627a1..b6cf28f 100644 --- a/docs/SUPABASE_DUMP_GUIDE.md +++ b/docs/SUPABASE_DUMP_GUIDE.md @@ -204,6 +204,30 @@ psql -U routecommerce -h 127.0.0.1 -d route_commerce -c "SELECT name, slug, crea - After dump, the local PostgREST needs a schema cache reload — restart the postgrest process or it'll serve stale metadata for ~30 seconds. +## Post-restore: clean up test brands + +The captured production data includes 3 test brands with hardcoded +sequential UUIDs (`a1b2c3d4-…`, `b2c3d4e5-…`, `c3d4e5f6-…`) created +during the migration work. They have no related rows in any of the 38 +tables that FK to `brands.id`, so deletion is safe (CASCADE / NO ACTION +on zero rows is a no-op). + +```sql +BEGIN; + DELETE FROM brands + WHERE slug IN ('sunrise-farms', 'green-valley', 'orchard-fresh'); + -- expect DELETE 3 +COMMIT; +``` + +Verify the real brands remain: + +```sql +SELECT name, slug, plan_tier FROM brands ORDER BY created_at; +-- Tuxedo Corn | tuxedo | starter +-- Indian River Direct | indian-river-direct | starter +``` + ## Migrating Brand Assets (Supabase Storage → MinIO) Brand logos and other Storage files are NOT in the Postgres dump. The