apply-migration

Apply and verify SQL migrations against a Supabase database.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Acurioustractor/justicehub-platform --skill apply-migration
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: apply-migration
Source: https://github.com/Acurioustractor/justicehub-platform/tree/main/.claude/skills/apply-migration
Command: npx skills add https://github.com/Acurioustractor/justicehub-platform --skill apply-migration

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pg, and includes scripts (resource) components.

What problem does it solve?

This Skill automates applying SQL migrations to the JusticeHub Supabase database and verifies changes, reducing manual steps and preventing partial deployments.

Core Features & Use Cases

  • Transactional migration execution: runs migrations inside a transaction with safety checks and rollback reminders.
  • Schema verification: validates that expected tables and columns exist after migration.
  • Operational guidance: works with migrations stored under supabase/migrations and uses environment credentials for access.

Quick Start

Run /apply-migration 20260102_alma_unification_links.sql to apply a migration from supabase/migrations to your Supabase database.

Frequently Asked Questions about apply-migration

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

FAQPage Schema
How do I automate SQL migrations against a Supabase database safely?

Automating SQL migrations against a Supabase database requires running migration files transactionally with safety checks and rollback reminders to prevent partial deployments. This Skill executes scripts from the supabase/migrations directory inside a transaction using the pg library and environment credentials.

What is transactional migration execution and why is it needed for PostgreSQL?

Transactional migration execution runs SQL schema changes within a single database transaction, ensuring that all operations succeed or fail together. This mechanism prevents partial deployments and keeps the PostgreSQL database schema consistent if an error occurs during execution.

How do I verify database schema changes after applying SQL migrations?

Verifying database schema changes after applying SQL migrations involves validating that expected tables and columns exist in the database. This Skill performs schema verification post-migration to confirm the Supabase database structure matches the intended outcome.

Do I need the pg library and environment variables to apply PostgreSQL migrations?

Applying PostgreSQL migrations with this Skill requires the pg library and proper environment variables configured for database access. These dependencies provide the necessary connection layer to authenticate and execute SQL scripts against the Supabase database.

Can I use this to deploy schema changes across development, staging, and production workflows?

Deploying schema changes across development, staging, and production workflows is supported by this Skill. It applies SQL migrations and verifies changes specifically for environments like the JusticeHub Supabase backend, ensuring consistent schema updates across different deployment stages.