add-drizzle-migration

Generates and applies Drizzle migrations for Axentra PostgreSQL schema changes.

Updated Sep 16, 2026
One-click install
npx skills add https://github.com/PT-Perkasa-Pilar-Utama/axentra --skill add-drizzle-migration-pt-perkasa-pilar-utama
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: add-drizzle-migration
Source: https://github.com/PT-Perkasa-Pilar-Utama/axentra/tree/main/.claude/skills/add-drizzle-migration
Command: npx skills add https://github.com/PT-Perkasa-Pilar-Utama/axentra --skill add-drizzle-migration-pt-perkasa-pilar-utama

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Changing a PostgreSQL schema safely requires disciplined migration generation, review, and conflict handling; this Skill enforces the approved Axentra workflow so schema changes stay consistent, reviewable, and free of hand-edited SQL. ## Core Features & Use Cases - Guided migration protocol: Walks through branching from dev, editing packages/db/src/schema, running bun run db:generate exactly once, and reviewing generated SQL. - Conflict recovery: Handles the case where another PR generated a migration after your branch point by rebasing, removing only your obsolete migration, and regenerating. - Schema quality rules: Enforces explicit primary keys, timestamps, indexes, and database-level uniqueness and foreign keys. - Use Case: You have an approved card to add a documents table. Use this Skill to edit the Drizzle schema, generate the migration, test it against a disposable local database, and pass bun run complete-check before opening the PR. ## Quick Start Use the add-drizzle-migration skill to create a migration for my approved schema change in packages/db/src/schema.

Frequently Asked Questions about add-drizzle-migration

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

FAQPage Schema
How do I create a Drizzle migration for a PostgreSQL schema change?▼

Edit the schema in packages/db/src/schema, update its exports, then run bun run db:generate exactly once. Review the generated SQL in packages/db/drizzle and never hand-edit generated migration files.

How to resolve Drizzle migration conflicts after rebasing?▼

Rebase on origin/dev, remove only your own obsolete generated migration, regenerate once with bun run db:generate, and rerun checks. Never modify or delete migrations generated by other pull requests.

Can I hand-edit generated Drizzle migration SQL files?▼

No, generated migrations in packages/db/drizzle must never be hand-edited. If the SQL is wrong, fix the schema definition and regenerate the migration instead.

When should I not add new database tables with Drizzle?▼

Do not add domain tables without an approved card and acceptance criteria. Foundation v0.1.0 intentionally has no business tables, so schema changes require an approved task first.

Can I run Drizzle migrations against production from my laptop?▼

No, migrations must never be run against production from a developer laptop. Test with bun run db:migrate only against a disposable local database before submitting.