Migrate Orders To Canonical Schema

Use when running migration 0004 that normalizes the orders table from a Stripe-specific shape (stripe_session_id, stripe_customer_id as top-level columns) to a canonical provider-agnostic shape (provider, provider_order_id, provider_customer_id). Covers the four-phase safe migration procedure — add nullable columns, backfill from existing data, validate, drop legacy columns — and the RLS policy update that must accompany the column rename. Do NOT use for unrelated schema migrations (write a fresh skill anchored to that migration's number), for designing a new canonical schema from scratch, or for the ongoing orgQuery access pattern (use postgres-rls-pattern).

jacob-balslev Updated

File contents

jacob-balslev/skill-graph/tree/main/examples/projects/saas-stripe-postgres/skills/migrate-orders-to-canonical-schema commit c2f7df5c61

Frequently asked questions

npx skillmds@latest add jacob-balslev/migrate-orders-to-canonical-schema