Skill / SKILL.md

Drizzle Migrations

PackmindHub/skillsight

How to safely add, edit, and verify Drizzle migrations in the skills-observability backend (PostgreSQL + Drizzle ORM). Covers the schema-first generation flow, the strict monotonicity invariant of `_journal.json` `when` timestamps (whose violation has silently skipped migrations in production), idempotent SQL patterns, and how to verify on a fresh DB before merging. Use this skill whenever the user edits `backend/src/db/schema.ts`, runs `bun run migrate:generate` or `bun run migrate:run`, hand-edits anything under `backend/src/db/migrations/` (including `meta/_journal.json`), asks about adding or altering a database column / table / index / constraint, debugs a migration that "didn't apply" or "ran in dev but not prod", or resolves a merge conflict in the migration journal. Trigger this even if the user only mentions a small schema tweak — the journal pitfall is the kind of bug where everything looks fine until production silently diverges, and the right time to apply this guidance is before the schema edit, not after.
3 views 10 repository stars 0 commentsUpdated Nov 28, 2026
Overview

How to safely add, edit, and verify Drizzle migrations in the skills-observability backend (PostgreSQL + Drizzle ORM). Covers the schema-first generation flow, the strict monotonicity invariant of `_journal.json` `when` timestamps (whose violation has silently skipped migrations in production), idempotent SQL patterns, and how to verify on a fresh DB before merging. Use this skill whenever the user edits `backend/src/db/schema.ts`, runs `bun run migrate:generate` or `bun run migrate:run`, hand-edits anything under `backend/src/db/migrations/` (including `meta/_journal.json`), asks about adding or altering a database column / table / index / constraint, debugs a migration that "didn't apply" or "ran in dev but not prod", or resolves a merge conflict in the migration journal. Trigger this even if the user only mentions a small schema tweak — the journal pitfall is the kind of bug where everything looks fine until production silently diverges, and the right time to apply this guidance is before the schema edit, not after.

Installation & variants

Download the repository, including the skill’s supporting files.

git clone -- 'https://github.com/PackmindHub/skillsight' skill-source

Use the complete skill-source/.claude/skills/drizzle-migrations directory with your client’s skill installer.

  • .claude/skills/drizzle-migrations Claude Code

    main · SKILL.md

    Open installation source

    Client installation directory present in source repository

Source directory .claude/skills/drizzle-migrations

Source instructions
Read source instructions

Open to load source instructions

Original SKILL.md

Open to load the original file

Included files
Source & validation
Source status
Awaiting source check
Format validation
Needs source review
Checked at
Pending source check
Content SHA-256
4cbf6b5cccaad5c92157452adb93a7ac3154b6106318f7d148b199378420f17c
Format validation findings
  • Invalid or missing description.
Agent Skills specification
Discussion
Comments Be the First to Comment

Please log in to comment

    No comments yet

Related skills