migration-test-and-push

Automate staged Supabase database migrations with pgTAP tests and approvals.

30|3|Updated Jan 23, 2026
One-click install
npx skills add https://github.com/enbyaugust/zacs-claude-skills --skill migration-test-and-push
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migration-test-and-push
Source: https://github.com/enbyaugust/zacs-claude-skills/tree/main/skills/migration-test-and-push
Command: npx skills add https://github.com/enbyaugust/zacs-claude-skills --skill migration-test-and-push

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill orchestrates a safe, auditable, multi-stage database migration workflow for Supabase projects, ensuring promotion across environments with built-in checks, approvals, and rollback readiness.

Core Features & Use Cases

  • Staged promotion: Local → Staging → Production with safety gates at each stage.
  • Comprehensive checks: Pre-flight validations, unit tests (pgTAP), test coverage assessment, and rollback planning.
  • Controlled deployment: Backups, approvals, dry-runs, and verification steps before production push.

Quick Start

Start a local migration validation with test migration to reset the local DB, run pgTAP tests, and prepare for staging. Then obtain approval for staging push and finally trigger production push with explicit approval.

Frequently Asked Questions about migration-test-and-push

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

FAQPage Schema
How do I automate Supabase database migration across local, staging, and production?

Automating Supabase database migration requires a multi-stage workflow enforcing local validation, staging promotion, and production deployment with explicit approvals, backups, and rollback planning. This ensures safe, auditable schema changes across environments.

What is a safe database migration workflow with rollback planning?

A safe database migration workflow enforces staged promotion gates, applying pre-flight validations, pgTAP tests, and backups before production deployment. Rollback planning ensures you can revert schema changes if production pushes encounter verification failures.

How do I run pgTAP tests before pushing a Supabase migration to staging?

Running pgTAP tests before pushing a Supabase migration to staging involves resetting the local database, applying the test migration, and executing unit tests to assess coverage. This local validation gate prevents untested schema changes from reaching staging.

Can I require explicit approval before a production database push?

Yes, requiring explicit approval before a production database push is a core safety gate. The workflow enforces controlled deployment by demanding dry-run verification, backups, and manual sign-off before applying any migration to the production environment.

Does this migration workflow handle post-push type generation for Supabase?

Yes, the migration workflow handles post-push type generation for Supabase. After the production database push clears its verification steps, the process automatically generates updated types to match the newly applied database schema.

What are the limitations of deploying database migrations without safety gates?

Deploying database migrations without safety gates risks unvalidated schema changes reaching production. Skipping pre-flight checks, pgTAP tests, backups, and explicit approvals removes rollback readiness and jeopardizes database stability during staging or production promotion.