Database Development

Generate and apply Drizzle ORM database migrations with journal tracking.

1.1k|68|Updated Nov 14, 2025
One-click install
npx skills add https://github.com/vm0-ai/vm0 --skill database-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Database Development
Source: https://github.com/vm0-ai/vm0/tree/main/.claude/skills/database-development
Command: npx skills add https://github.com/vm0-ai/vm0 --skill database-development

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates and standardizes database migrations for the vm0 project, reducing manual drift and ensuring consistent application of Drizzle ORM guidelines across environments.

Core Features & Use Cases

  • Migration generation: automatically generate migrations from schema changes.
  • ORM guidelines enforcement: codifies and enforces Drizzle ORM best practices in the codebase.
  • Journal-based tracking: requires and records manual migration journal entries to ensure CI/CD reliability.
  • Use Case: when updating a table schema, use this Skill to generate, validate, and apply migrations with proper auditing.

Quick Start

Use the Skill to generate and apply migrations with pnpm scripts. For example, run pnpm db:generate to create migrations from schema changes, then pnpm db:migrate to apply them, and finally pnpm db:studio to inspect migrations in Drizzle Studio.

Frequently Asked Questions about Database Development

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

FAQPage Schema
How do I generate and apply database migrations with Drizzle ORM?

To generate database migrations with Drizzle ORM, run pnpm db:generate to create migration files from schema changes, then execute pnpm db:migrate to apply them. Use pnpm db:studio to inspect the applied migrations visually in Drizzle Studio.

Why do I need a _journal.json entry for my database migrations?

A _journal.json entry is required for database migrations to ensure CI/CD reliability through journal-based tracking. This mandatory recording prevents manual drift and guarantees that schema changes are consistently audited across staging and production environments.

What's the best way to enforce Drizzle ORM guidelines in a backend workflow?

The best way to enforce Drizzle ORM guidelines is by codifying best practices directly into the backend development workflow. This standardizes schema modifications, requires migration auditing, and ensures consistent application across all deployment environments.

Can I inspect staging and production schema changes using Drizzle Studio?

Yes, you can inspect staging and production schema changes using Drizzle Studio by running pnpm db:studio. This allows you to visually validate database migrations and audit table schema modifications after applying them.

When do I need to run pnpm db:generate for schema changes?

You need to run pnpm db:generate whenever you modify a table schema and want to create corresponding database migrations. It automatically translates your Drizzle ORM schema updates into migration files for subsequent application and auditing.

Does this database migration workflow support pnpm scripts?

Yes, this database migration workflow fully supports pnpm scripts for generation, execution, and inspection. Commands like pnpm db:generate, pnpm db:migrate, and pnpm db:studio are provided to manage the entire Drizzle ORM migration lifecycle.