database-migration

Guide Drizzle ORM schema changes into reviewed D1 migration files.

Updated Aug 29, 2025
One-click install
npx skills add https://github.com/teocrafters/public-talk-planner --skill database-migration-teocrafters
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migration
Source: https://github.com/teocrafters/public-talk-planner/tree/main/.claude/skills/database-migration
Command: npx skills add https://github.com/teocrafters/public-talk-planner --skill database-migration-teocrafters

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Database schema changes are risky and error-prone; this skill guides safe, review-driven migration generation for Drizzle ORM with D1, ensuring schema.ts changes are properly transformed into vetted migration files.

Core Features & Use Cases

  • Step-by-step workflow for detecting schema changes, generating migrations, reviewing SQL, testing locally, and committing schema + migrations together.
  • Enforces safety constraints: never edit migrations manually, never auto-run generation, and mandatory user confirmation before each stage.
  • Use Case: When updating server/database/schema.ts or introducing new tables/column changes, follow this skill to produce reliable migrations and maintain auditability.

Quick Start

Modify server/database/schema.ts and follow the prompts to generate, review, test, and commit the migration together.

Frequently Asked Questions about database-migration

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

FAQPage Schema
How do I safely generate Drizzle ORM migrations for D1?

The migration workflow detects schema.ts changes and guides you through generating, reviewing SQL, testing locally, and committing migrations while enforcing safety constraints like mandatory user confirmation before each stage.

Can I manually edit Drizzle ORM migration files?

No, manually editing migration files is strictly prohibited. The workflow enforces safety constraints by requiring user-driven generation prompts and mandatory review checkpoints to maintain auditability and prevent unsafe database schema changes.

What is the workflow for updating D1 database schema with Drizzle ORM?

The workflow involves modifying server/database/schema.ts, detecting changes, generating migration files, reviewing SQL output, testing locally, and committing schema and migrations together to maintain auditability and prevent risky schema changes.

Does this database migration process auto-run generation for schema changes?

No, it never auto-runs generation. The process enforces a strict, user-driven workflow with generation prompts and mandatory user confirmation before each stage to ensure safe, review-driven migration generation.

Why are database schema changes risky and how does a review checkpoint help?

Database schema changes are risky because they can introduce errors. Review checkpoints help by requiring you to vet generated SQL and test locally before committing, ensuring schema.ts changes are properly transformed into safe migration files.

When do I need to follow a strict migration workflow for D1?

You need this workflow whenever updating server/database/schema.ts or introducing new tables and columns. It ensures changes are properly transformed into vetted migration files and maintains auditability through review-driven generation.