What problem does it solve?
This Skill prevents database schema drift and migration mistakes by guiding you through the correct Drizzle Kit workflow for generating, reviewing, and applying schema changes to the asset-forge database.
Core Features & Use Cases
- Schema-to-migration generation: Creates new SQL migrations from updated TypeScript schema files in the Drizzle schema directory.
- Safety-first SQL review: Prompts you to inspect the generated migration SQL to confirm intended changes and avoid accidental drops or incorrect foreign keys.
- Apply-and-verify workflow: Applies pending migrations and then validates the results using Drizzle Studio to confirm tables, indexes, and constraints are correct.
- Use Case: After adding a new column (for example,
description to a teams table) in server/db/schema/, generate the migration, review the SQL, apply it to the database, and verify the resulting table in Drizzle Studio.
Quick Start
Use this skill when you modify Drizzle schema files and want to run bun db:generate, review the newest SQL migration, then apply it with bun db:migrate.