veta-db-migrations

Create and apply local Supabase SQL migrations with RLS and TypeScript types.

1|Updated Nov 26, 2025
One-click install
npx skills add https://github.com/marcogonzalo/studio-manager --skill veta-db-migrations
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: veta-db-migrations
Source: https://github.com/marcogonzalo/studio-manager/tree/main/.agents/skills/veta-db-migrations
Command: npx skills add https://github.com/marcogonzalo/studio-manager --skill veta-db-migrations

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents risky or destructive schema changes by enforcing a safe, local-only Supabase migration workflow with RLS and updated TypeScript types.

Core Features & Use Cases

  • Local-only migration execution: Use Supabase CLI commands that apply changes to the local database only, avoiding accidental production impact.
  • Migration correctness with RLS: Ensure every new table enables RLS and includes required policies for SELECT/INSERT/UPDATE/DELETE.
  • Type safety after schema changes: Update the project’s TypeScript types (including generated Supabase types) so the app remains consistent with the Postgres schema.

Quick Start

Tell me to create a new timestamped SQL migration for a proposed schema change, including RLS policies and the necessary TypeScript type updates, and to generate the exact local db:push/db:reset workflow you want me to follow.

Frequently Asked Questions about veta-db-migrations

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

FAQPage Schema
How do I apply Supabase database migrations safely without affecting production data?

Apply Supabase database migrations safely by enforcing a local-only workflow using Supabase CLI commands for db:push and db:reset. This prevents accidental production impact by restricting schema changes to your local environment before deployment.

How do I add a new table and enable RLS in a Supabase migration?

To add a new table and enable RLS in a Supabase migration, create a timestamped SQL file in the supabase/migrations directory. The workflow requires every new table to enable Row Level Security and include explicit policies for SELECT, INSERT, UPDATE, and DELETE operations.

What is the best way to update TypeScript types after a Supabase schema change?

Update TypeScript types after a Supabase schema change by generating updated Supabase types as part of your local migration workflow. This ensures your application remains type-safe and consistent with the latest Postgres schema modifications.

Do I need Supabase CLI to run local database migrations for schema changes?

Yes, you need the Supabase CLI to execute local database migrations safely. The workflow relies on CLI commands to apply local-only db:push and db:reset operations, manage timestamp-ordered SQL files, and enforce RLS policies without risking production data loss.

Can I use this workflow to check migration status and diffs for my local Supabase database?

Yes, you can use this local migration workflow to check migration status and view diffs for your local Supabase database. It supports local schema development tasks including adding tables or columns and verifying migration state before any deployment.

Why should I avoid direct db push commands when modifying Supabase schemas?

Avoiding direct db push commands prevents risky or destructive schema changes to production data. Enforcing a local-only migration workflow ensures all SQL files, RLS policies, and TypeScript type updates are validated locally first, eliminating accidental production impact.