supabase-deployment

Deploy Supabase migrations across environments with idempotent SQL and rollback readiness.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Acurioustractor/empathy-ledger-v2 --skill supabase-deployment
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-deployment
Source: https://github.com/Acurioustractor/empathy-ledger-v2/tree/main/.claude/skills/local/supabase-deployment
Command: npx skills add https://github.com/Acurioustractor/empathy-ledger-v2 --skill supabase-deployment

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Solves the problem of safely deploying Supabase migrations across multiple environments.

Core Features & Use Cases

  • Idempotent migrations: Create and apply SQL changes that can be re-run without duplicating effects, preserving data integrity.
  • Local testing & validation: Test migrations locally with standard Supabase commands and compare changes before production.
  • Type generation & integration: Generate TypeScript types from the database schema to keep frontend and backend in sync.
  • Production deployment workflow: Push migrations to production with verification and rollback considerations, following documented best practices.
  • Reference-guided workflow: Access migration patterns, troubleshooting, and deployment steps from the provided refs for consistent operations.

Quick Start

  • Create migration: npx supabase migration new your_change_description
  • Write idempotent SQL (see refs/migration-patterns.md)
  • Test locally: npx supabase db reset
  • Generate types: npx supabase gen types typescript --local > src/lib/database/types/database-generated.ts
  • Deploy to production: npx supabase db push

Frequently Asked Questions about supabase-deployment

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely deploy Supabase migrations across multiple environments?

Safely deploy Supabase migrations by creating idempotent SQL changes, testing locally with `npx supabase db reset`, generating TypeScript types, and pushing to production using `npx supabase db push` while maintaining rollback readiness.

What are idempotent SQL patterns for Supabase database migrations?

Idempotent SQL patterns are migration scripts designed to be re-run without duplicating effects or corrupting data integrity. They ensure consistent schema changes across multi-tenant environments by preventing duplicate column creations or data overwrites during repeated deployments.

How do I generate TypeScript types from my Supabase database schema?

Generate TypeScript types from your Supabase database schema by running `npx supabase gen types typescript --local` and outputting the result to a local types file. This keeps frontend and backend type definitions synchronized after local testing.

Can I test Supabase migrations locally before pushing to production?

Yes, you can test Supabase migrations locally before production deployment by applying changes with `npx supabase db reset`. This validates schema updates, RLS policies, and data integrity in an isolated local environment before affecting production.

What is the best way to handle rollback readiness for Supabase schema changes?

Handle rollback readiness for Supabase schema changes by enforcing idempotent SQL patterns and following a reference-guided workflow from local validation to production. This provides documented troubleshooting steps and ensures safe, repeatable deployment operations.