db-migration

Generates Prisma migration plans and reviews SQL for TypeScript projects.

3|2|Updated Jun 25, 2024
One-click install
npx skills add https://github.com/Hopin-inc/civicship-api --skill db-migration-hopin-inc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-migration
Source: https://github.com/Hopin-inc/civicship-api/tree/main/.claude/skills/db-migration
Command: npx skills add https://github.com/Hopin-inc/civicship-api --skill db-migration-hopin-inc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prisma-based projects often struggle with evolving schemas safely; this skill provides a structured workflow to detect changes, validate safety, and plan migrations to reduce risk and downtime.

Core Features & Use Cases

  • Descriptive workflow: Detect schema changes, validate safety, generate migration plans, review SQL, and regenerate Prisma client.
  • Compliance with best practices: enforce non-destructive changes, indexing guidelines, and rollback planning.
  • Use Case: When evolving a Prisma schema across environments, apply this workflow to create auditable, repeatable migrations that preserve data integrity.

Quick Start

Run the migration guidance to scaffold and review a Prisma migration plan for your latest schema changes.

Frequently Asked Questions about db-migration

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

FAQPage Schema
How do I perform a safe Prisma database migration in TypeScript?

To perform a safe Prisma database migration in TypeScript, you need a structured workflow to detect schema changes, validate safety, generate migration plans, review SQL, and regenerate the Prisma client. This minimizes downtime through non-destructive changes and rollback planning.

What is the best way to minimize downtime during a SQL schema evolution?

Minimizing downtime during SQL schema evolution requires enforcing non-destructive changes and indexing guidelines. A structured migration workflow validates safety and generates auditable plans to preserve data integrity across staging to production environments.

Can I use this workflow to review SQL before applying Prisma migrations to production?

Yes, you can use this workflow to review SQL before applying Prisma migrations to production. It provides detailed review prompts and enforces best practices to ensure database migrations are auditable, repeatable, and safe for production environments.

How do I regenerate the Prisma client after evolving my database schema?

To regenerate the Prisma client after evolving your database schema, follow a structured migration workflow that detects schema changes and applies them safely. This ensures the client accurately reflects the latest non-destructive schema updates.

Does this database migration approach enforce rollback planning?

Yes, this database migration approach enforces rollback planning. It guides Prisma-based database migrations by enforcing best practices, including non-destructive changes, indexing recommendations, and detailed rollback planning to reduce risk.

Why does my Prisma migration workflow need indexing recommendations?

Your Prisma migration workflow needs indexing recommendations to maintain query performance during SQL schema evolution. Enforcing these guidelines as part of a structured database migration plan helps preserve data integrity and minimize downtime.