db-migrate

Generate and apply Drizzle ORM migrations for Bun-based services.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/monobaselabs/monobase-js --skill db-migrate-monobaselabs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-migrate
Source: https://github.com/monobaselabs/monobase-js/tree/main/.claude/skills/db-migrate
Command: npx skills add https://github.com/monobaselabs/monobase-js --skill db-migrate-monobaselabs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Drizzle ORM-based projects risk drift and manual errors when evolving schemas; this skill automates schema changes and migration generation to keep databases consistent.

Core Features & Use Cases

  • Edit and extend schemas in services/api-ts/src/core/database.schema.ts
  • Generate and review migrations with the provided workflow, ensuring correct naming, indexes, and foreign keys
  • Apply migrations safely and inspect generated SQL to verify correctness

Quick Start

Modify services/api-ts/src/core/database.schema.ts and run the migration generator to create and apply migrations.

Frequently Asked Questions about db-migrate

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

FAQPage Schema
How do I automate database migrations and schema changes for Drizzle ORM?

To automate database migrations for Drizzle ORM, you modify your schema file and run a migration generator to create and apply schema changes safely. This prevents manual errors and schema drift by automatically generating SQL migrations.

How do I generate and apply SQL migrations after updating a TypeScript database schema?

Generating and applying SQL migrations requires editing your TypeScript database schema file and running the migration generator. You inspect the generated SQL to verify naming, indexes, and foreign keys before safely applying the changes to the database.

Can I use Bun with Drizzle ORM to manage database schema evolution?

Yes, you can use Bun with Drizzle ORM to manage database schema evolution in backend services. The workflow supports adding tables, fields, indexes, and relationships by automating migration generation and safe application after schema changes.

What is the best way to prevent schema drift when evolving Drizzle ORM schemas?

The best way to prevent schema drift when evolving Drizzle ORM schemas is to automate schema changes and migration generation. This ensures databases remain consistent by applying conventions for naming and constraints across backend modules.

Do I need a specific schema file to automate Drizzle ORM migrations in Bun?

Yes, automating Drizzle ORM migrations requires a well-defined schema file, typically located at services/api-ts/src/core/database.schema.ts. This file serves as the source of truth for generating migrations with correct indexes and foreign keys.

Why should I inspect generated SQL when applying database schema migrations?

Inspecting generated SQL when applying database schema migrations verifies correctness, ensuring proper naming, indexes, and foreign keys. This safety step prevents errors and ensures the automated schema changes match your intended database structure.