db-migrate

Generate and validate Drizzle Postgres migrations for FixNow schema changes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you make database schema changes in FixNow without accidentally breaking data, losing records, or shipping an unsafe migration.

Core Features & Use Cases

  • Schema updates: Add columns, tables, indexes, or relations in a controlled way.
  • Migration generation and validation: Generate Drizzle migrations, inspect the SQL, and catch risky changes like unintended drops or rename mishandling.
  • Documentation sync: Keep docs/database-schema.md aligned with the live schema after changes.
  • Use case: When you need to add a review table, change an enum, or introduce a new required field, this Skill guides the edit, migration, verification, and docs update flow.

Quick Start

Ask for a safe Drizzle schema change for FixNow, for example: add a new nullable phone_notes field to the users table and update the migration and schema docs.

Frequently Asked Questions about db-migrate

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

FAQPage Schema
How do I generate a safe Postgres migration when modifying a Drizzle schema?

To generate a safe Postgres migration, modify your Drizzle schema and use this process to inspect the generated SQL, catching risky changes like unintended drops or rename mishandling before execution. It validates changes to prevent data loss.

What is the safest way to add a new column to a production database using Drizzle?

The safest way to add a column is applying a controlled schema edit, generating a Drizzle migration, and verifying the SQL output for risky operations. This workflow prevents production data loss when introducing new nullable or required fields.

How does Drizzle handle enum changes in Postgres migrations without losing data?

Drizzle handles enum changes by guiding the schema edit and validating the generated Postgres migration SQL. This controlled workflow catches unsafe modifications, ensuring enum changes in production databases do not cause unintended data loss.

Can I use this workflow to add indexes and relations to an existing Postgres schema?

Yes, you can use this workflow to add indexes and relations to an existing Postgres schema. It safely modifies the Drizzle schema, generates a validated migration, verifies the SQL, and updates documentation to align with the live database.

Why should I verify generated SQL before running a Drizzle schema migration?

You should verify generated SQL before running a Drizzle schema migration to catch risky changes like unintended table drops or rename mishandling. This verification step is critical to prevent irreversible data loss in production database workflows.

Do I need to manually update database documentation after generating a Drizzle migration?

You do not need to manually update database documentation after generating a Drizzle migration. The workflow includes a documentation sync step to keep your schema docs aligned with the live Postgres database after changes are applied.