From c8d24a2a3aec677d5ad718d052d559170fe4c594 Mon Sep 17 00:00:00 2001 From: belviskhoremk Date: Wed, 12 Aug 2026 20:27:15 +0200 Subject: [PATCH] docs: warn that re-seeding reverts admin-panel edits --- README.md | 2 +- scripts/seed.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2cff5f7..a3af73c 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Public marketing site for Braids by Mira — landing page, product showcase, boo - `npm run build` — type-check and build for production - `npm run lint` — run ESLint - `npm run test:functions` — run the Deno tests for the Edge Functions' shared email builders (requires [Deno](https://deno.com) installed) -- `npm run seed` — seed products, services, and the default schedule into a Supabase project (see below) +- `npm run seed` — seed products, services, and the default schedule into a Supabase project (see below). Re-running it after admin-panel edits will revert those rows to the hardcoded seed defaults — use it for initial setup / disaster recovery, not routine use. ## Backend (Supabase) diff --git a/scripts/seed.ts b/scripts/seed.ts index 38975f5..41fe012 100644 --- a/scripts/seed.ts +++ b/scripts/seed.ts @@ -5,6 +5,9 @@ import { createClient } from '@supabase/supabase-js' // `src/data/products.ts` and `src/data/services.ts` now fetch live rows from Supabase // (see Tasks 2-3 of this plan) instead of exporting static arrays, so this seed script // owns its own copy of the seed data below rather than importing it from application code. +// WARNING: re-running this after admin-panel edits will revert those rows to these seed +// defaults (unconditional upsert keyed on id). Intended for initial setup / disaster +// recovery only, not routine use. interface SeedProduct { id: string name: string