supabase-migration

Automate Supabase database migrations with versioned SQL and RLS policies.

2|Updated Dec 1, 2025
One-click install
npx skills add https://github.com/Shirataki2/discalendar-next-v2 --skill supabase-migration-shirataki2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-migration
Source: https://github.com/Shirataki2/discalendar-next-v2/tree/main/.cursor/skills/supabase-migration
Command: npx skills add https://github.com/Shirataki2/discalendar-next-v2 --skill supabase-migration-shirataki2

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Supabase migrations are coordinated through a unified workflow that ensures migrations, seed data, and policy changes are tracked and applied reliably, reducing drift across environments.

Core Features & Use Cases

  • Phase 1: Migration file creation with timestamped filenames under supabase/migrations.
  • Phase 2: Seed data updates and optional seeding steps.
  • Phase 3: Local validation and deployment workflow, including RLS enabling and policy patterns.
  • Use Case: When updating the database schema (tables, columns, policies) for a project, apply this workflow to keep changes auditable and rollback-ready.

Quick Start

Create a new migration following the defined filename convention, implement the required SQL changes, validate locally, and apply the migration to your Supabase project.

Frequently Asked Questions about supabase-migration

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

FAQPage Schema
How do I manage Supabase database migrations for schema changes?

Supabase database migrations are managed by creating timestamped SQL files in the supabase/migrations directory to track table creation, column changes, and indexing. This approach keeps schema evolution auditable and rollback-ready across environments.

How do I enable and update RLS policies in a Supabase migration?

To enable RLS policies in a Supabase migration, you include the necessary row level security SQL statements within your migration files. This workflow ensures access controls are enforced and tracked alongside schema changes during deployment.

What is the best way to update seed data during a Supabase database migration?

The best way to update seed data is to apply a coordinated workflow that includes optional seeding steps alongside your schema migrations. This ensures seed data updates are tracked reliably, reducing drift across different deployment environments.

Can I validate Supabase migration changes through CI/CD pipelines?

Yes, you can validate Supabase migration changes through CI/CD checks. The workflow supports local validation and deployment steps to ensure versioned SQL files and RLS policies are correctly applied before reaching production.

Why do I need versioned SQL files in supabase/migrations?

You need versioned SQL files in supabase/migrations to prevent schema drift across environments. This convention automates the coordination of database changes, ensuring table modifications and RLS policies are applied reliably and remain auditable.

Does this Supabase migration workflow handle column changes and indexing?

Yes, this Supabase migration workflow handles column changes and indexing. It automates the application of these schema evolutions by generating timestamped migration files that capture all structural database modifications.