supabase-migration-deep-dive

Solid

Database migration patterns with Supabase CLI: npx supabase migration new, zero-downtime migrations, data backfill strategies, schema versioning, rollback strategies, and type generation. Use when creating database migrations, performing zero-downtime schema changes, backfilling data in production, managing schema versions, or planning rollback strategies. Trigger: "supabase migration", "supabase schema change", "supabase zero downtime", "supabase rollback", "supabase db push", "supabase migration new".

API & Backend 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Supabase Migration Deep Dive ## Overview Supabase migrations are SQL files managed by the CLI that track schema changes across environments. This skill covers the complete migration lifecycle: creating migrations with `npx supabase migration new`, writing zero-downtime schema changes that avoid table locks, backfilling data in batches, managing schema versioning across environments, planning rollback strategies, and regenerating TypeScript types after schema changes. Every pattern uses real Supabase CLI commands and `createClient` from `@supabase/supabase-js`. **When to use:** Creating new database migrations, modifying production schemas without downtime, backfilling existing data after adding columns, managing migration history across dev/staging/production, rolling back failed migrations, or regenerating TypeScript types. ## Prerequisites - Supabase CLI installed: `npm install -g supabase` or `npx supabase --version` - `@supabase/supabase-js` v2+ installed in your project - Local Supabase running: `npx supabase start` - Understanding of PostgreSQL DDL and transaction behavior ## Instructions ### Step 1: Create and Manage Migrations Use the Supabase CLI to create, test, and apply migrations. Each migration is a timestamped SQL file that runs in order. **Create a new migration:** ```bash # Create a migration file with a descriptive name npx supabase migration new add_profiles_table # Creates: supabase/migrations/20260322120000_add_profiles_table.sql # List all m...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

supabase-deploy-integration

Deploy and manage Supabase projects in production. Covers database migrations, Edge Functions deployment, secrets management, zero-downtime rollouts, blue/green branching, rollback procedures, and post-deploy health checks. Use when deploying Supabase to production, running migrations, deploying Edge Functions, managing secrets, or implementing zero-downtime deployments. Trigger: "deploy supabase", "supabase migration push", "deploy edge function", "supabase rollback", "supabase blue green", "supabase health check".

2,266 Updated today
jeremylongshore
API & Backend Solid

supabase-cli

This skill should be used when user asks to "use supabase CLI", "supabase init", "supabase start", "run migrations", "deploy edge functions", "manage Supabase project", or works with the supabase command-line tool for local development and project management.

711 Updated 2 days ago
fcakyon
API & Backend Listed

supabase-architect

Automates Supabase workflows including migrations, type synchronization, and schema security audits. Use when creating new database tables, updating schemas, or ensuring RLS compliance.

0 Updated 2 weeks ago
sf-bcca
API & Backend Solid

supabase-schema-from-requirements

Design Supabase Postgres schema from business requirements with migrations, RLS, and types. Use when translating specifications into database tables, creating migration files, adding Row Level Security policies, or generating TypeScript types from schema. Trigger with phrases like "supabase schema", "design database supabase", "schema from requirements", "supabase migration", "supabase tables from spec".

2,266 Updated today
jeremylongshore
API & Backend Listed

managing-supabase-schema-migrations

Guides creation, validation, and application of Supabase database migrations with RLS policy checks and type generation. Use when adding tables, modifying schema, or updating database structure.

2 Updated today
Hildegaardchiasmal966