ax-p1-migrate

Generate and apply Drizzle SQL migrations to a local D1 database.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/AX-BD-Team/Discovery-X --skill ax-p1-migrate
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ax-p1-migrate
Source: https://github.com/AX-BD-Team/Discovery-X/tree/main/.claude/skills/ax-p1-migrate
Command: npx skills add https://github.com/AX-BD-Team/Discovery-X --skill ax-p1-migrate

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the multi-step process of generating, applying, and verifying database migrations after schema changes, reducing manual effort and potential errors.

Core Features & Use Cases

  • One-step Migration: Executes pnpm db:generate, pnpm db:migrate, and updates test helper files.
  • Schema Synchronization: Ensures local database schema matches the latest Drizzle schema definitions.
  • Use Case: After modifying your Drizzle schema, run this Skill to automatically create the SQL migration, apply it to your local D1 database, and update the tests/helpers/db.ts file to reflect the changes, ensuring your tests remain accurate.

Quick Start

Run the ax-p1-migrate skill to generate, apply, and sync database migrations.

Frequently Asked Questions about ax-p1-migrate

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

FAQPage Schema
How do I automate Drizzle database migrations after schema changes?

Automating Drizzle database migrations involves executing pnpm db:generate and db:migrate to create SQL files, apply them to your local D1 database, and synchronize test helper files for test integrity.

What is the best way to sync test helpers with a local D1 database schema?

Syncing test helpers with your local D1 database schema is achieved by running an automated migration workflow that updates the tests/helpers/db.ts file to accurately reflect the latest Drizzle schema modifications.

Can I use pnpm to generate and apply Drizzle SQL files to a local D1 database?

Yes, you can use pnpm to generate and apply Drizzle SQL files to a local D1 database by executing pnpm db:generate followed by pnpm db:migrate within a TypeScript and Node.js environment.

How does schema synchronization work with Drizzle migrations in TypeScript?

Schema synchronization with Drizzle migrations in TypeScript works by generating SQL files from schema definitions, applying them to the local D1 database, and updating test helpers to ensure database consistency.

Does the Drizzle migration automation process update test files automatically?

Yes, the Drizzle migration automation process updates test files automatically by synchronizing the tests/helpers/db.ts file after applying the generated SQL migrations to your local D1 database.