Every file on this page was generated from sample_export.json by one script. A client's real export replaces that file; the same script regenerates the schema, policies, loads, user import and runbook. The sample entities are placeholders, which is why nothing here is usable as-is.
| File | What it is |
|---|---|
| schema_map.csv | Entity and field to Postgres table, column, type, nullability and the RLS rule the table gets |
| migration.sql | Tables with uuid keys, owner_id to auth.users, timestamps, indexes, RLS enabled, owner policies |
| auth_users.csv | User export in the shape the Auth admin import takes: email, provider, created_at, legacy id |
| load_rows.sql | Row inserts resolving owners by email, idempotent on legacy id, with a count check block |
| client_diff.md | Before and after call patterns for the code review, one pull request per entity |
| cutover_runbook.md | Seven-step cutover with a rollback point |
| supabase-migration-kit-demo.zip | All of the above plus the sample export |
| Table | Columns | Policies | Sample rows |
|---|---|---|---|
demo_customer | 6 | 4 | 3 |
demo_order | 6 | 4 | 4 |
demo_note | 4 | 2 | 2 |
✓ migration.sql: 20 statements parsed in the Postgres dialect ✓ load_rows.sql: 12 statements parsed in the Postgres dialect
-- generated by supabase_migration_kit_build.py 2026-09-19T16:11:28-06:00 -- DEMO schema: placeholder entities; replace sample_export.json with the client's export create extension if not exists pgcrypto; create table if not exists public.demo_customer ( id uuid primary key default gen_random_uuid(), legacy_id text unique, owner_id uuid not null references auth.users(id) on delete cascade, full_name text not null, email text not null, phone text, tier text, signed_up_at timestamptz, preferences jsonb, created_at timestamptz not null default now(), updated_at timestamptz not null default now() ); create index if not exists demo_customer_owner_idx on public.demo_customer(owner_id); alter table public.demo_customer enable row level security; create policy "demo_customer_select_own" on public.demo_customer for select to authenticated using (owner_id = auth.uid()); create policy "demo_customer_insert_own" on public.demo_customer for insert to authenticated with check (owner_id = auth.uid()); create policy "demo_customer_update_own" on public.demo_customer for update to authenticated using (owner_id = auth.uid()); create policy "demo_customer_delete_own" on public.demo_customer for delete to authenticated using (owner_id = auth.uid()); create table if not exists public.demo_order ( id uuid primary key default gen_random_uuid(), legacy_id text unique, owner_id uuid not null references auth.users(id) on delete cascade, customer_id text not null, status text not null, total numeric not null, currency text, placed_at timestamptz, line_items jsonb, created_at timestamptz not null default now(), updated_at timestamptz not null default now() ); create index if not exists demo_order_owner_idx on public.demo_order(owner_id); alter table public.demo_order enable row level security; create policy "demo_order_select_own" on public.demo_order for select to authenticated using (owner_id = auth.uid()); create policy "demo_order_insert_own" on public.demo_order for insert to authenticated with check (owner_id = auth.uid()); create policy "demo_order_update_own" on public.demo_order for update to authenticated using (owner_id = auth.uid()); -- ...