db-migrate

Generate and apply Drizzle ORM migration scripts for Supabase Postgres.

2|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/PlazaCC/antes-da-tela --skill db-migrate-plazacc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-migrate
Source: https://github.com/PlazaCC/antes-da-tela/tree/main/.agents/skills/db-migrate
Command: npx skills add https://github.com/PlazaCC/antes-da-tela --skill db-migrate-plazacc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It removes the manual, error‑prone steps of creating and applying database migrations after changing the Drizzle schema, ensuring consistency between code and the Supabase Postgres database.

Core Features & Use Cases

  • Generate Migration: Runs yarn drizzle-kit generate to produce SQL files reflecting schema changes.
  • Review & Verify: Encourages inspection of generated SQL and validation in Supabase's Table Editor.
  • Apply Migration: Executes yarn drizzle-kit migrate using the unpooled database URL for reliable schema updates.
  • Use Case: Ideal for developers modifying server/db/schema.ts who need an automated, repeatable migration workflow.

Quick Start

Use the db-migrate skill to generate and apply the latest migration after updating the database schema.

Frequently Asked Questions about db-migrate

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

FAQPage Schema
How do I generate and apply Drizzle migrations after updating my schema?

To generate and apply Drizzle migrations, you run `yarn drizzle-kit generate` to create SQL files reflecting schema changes, then execute `yarn drizzle-kit migrate` using the unpooled database URL to synchronize updates with Supabase Postgres.

What environment variable is needed to apply Drizzle migrations to Supabase Postgres?

Applying Drizzle migrations to Supabase Postgres requires the `DATABASE_URL_UNPOOLED` environment variable to ensure reliable schema updates during the migration execution process via the Yarn command-line tools.

Why use an unpooled database URL for Drizzle schema migrations?

Using an unpooled database URL for Drizzle schema migrations bypasses connection pooling, ensuring reliable and direct execution of schema updates on the Supabase Postgres database without connection timeout or transaction issues.

Do I need Yarn to run Drizzle migrations for Supabase?

Yes, you need Yarn command-line tools to execute the `yarn drizzle-kit generate` and `yarn drizzle-kit migrate` commands required to generate SQL files and apply schema updates to the Supabase Postgres database.

What is the best way to synchronize Drizzle schema changes with a Supabase database?

The best way to synchronize Drizzle schema changes is to generate migration scripts via `yarn drizzle-kit generate`, review the SQL output, and apply them using `yarn drizzle-kit migrate` with a direct unpooled connection for consistency.