db-migrations

Automates Drizzle database migrations with idempotent SQL and journal tracking.

Updated May 11, 2026
One-click install
npx skills add https://github.com/zmh13928433602-sys/lobe-chat --skill db-migrations-zmh13928433602-sys
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-migrations
Source: https://github.com/zmh13928433602-sys/lobe-chat/tree/main/.agents/skills/db-migrations
Command: npx skills add https://github.com/zmh13928433602-sys/lobe-chat --skill db-migrations-zmh13928433602-sys

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides developers through generating, validating, and applying database migrations with Drizzle Kit. It emphasizes idempotent patterns, proper sequencing, and journal updates to prevent drift.

Core Features & Use Cases

  • Generate migrations with drizzle-kit to update schemas safely.
  • Maintain a deterministic migration journal and snapshot alignment after changes.
  • Rename or reorganize migration files while preserving idempotent behavior and history.

Quick Start

Run drizzle-kit to generate and apply the next migration for your schema changes.

Frequently Asked Questions about db-migrations

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

FAQPage Schema
How do I generate idempotent SQL migrations with drizzle-kit?

To generate idempotent SQL migrations with drizzle-kit, use this skill to automate schema evolution while enforcing safe SQL patterns, updating migration journals, and maintaining snapshot alignment to prevent database drift.

What's the best way to rename database migration files without breaking the journal?

Renaming database migration files without breaking the journal requires preserving idempotent behavior and history; this skill guides you through reorganizing migration files while automatically updating journal metadata and maintaining correct sequencing.

Why does my database schema drift after applying drizzle-kit migrations?

Database schema drift after applying drizzle-kit migrations often occurs due to non-idempotent SQL patterns or outdated journal tracking; this skill enforces deterministic migration generation and snapshot alignment to prevent such drift.

How do I maintain deterministic migration sequencing when evolving a database schema?

Maintaining deterministic migration sequencing when evolving a database schema involves updating migration journals and metadata correctly; this skill automates the creation and management of these sequences to ensure safe schema evolution.

Can I use this skill to manage custom database migrations with specific naming conventions?

Yes, you can use this skill to manage custom database migrations, as it supports custom migrations with correct naming and sequencing while enforcing idempotent SQL patterns and updating journal metadata for Drizzle-based schemas.