database-migrations

Manage database schema migrations with Prisma Migrate across environments.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Dsantiagomj/DSMJ-Ai-Toolkit --skill database-migrations-dsantiagomj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-migrations
Source: https://github.com/Dsantiagomj/DSMJ-Ai-Toolkit/tree/main/skills/domain/database-migrations
Command: npx skills add https://github.com/Dsantiagomj/DSMJ-Ai-Toolkit --skill database-migrations-dsantiagomj

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill helps engineering teams manage database schema migrations safely, ensuring versioned changes, proper rollout, and reliable rollback strategies across environments.

Core Features & Use Cases

  • Migration planning: guidance on when to migrate, how to structure migrations, and how to review changes before applying.
  • Prisma-centric workflows: development with prisma migrate dev, production deployment with prisma migrate deploy, and reset considerations.
  • Backward-compatible changes & data migrations: safe patterns for adding fields, renames with @map, and data backfills to prevent downtime.

Quick Start

Install and configure Prisma, then create and apply a migration:

  1. Update schema.prisma to reflect desired changes.
  2. Run npx prisma migrate dev --name <description> to generate and apply migration.
  3. In CI/CD, run npx prisma migrate deploy to apply pending migrations in production. Example: migrate a new User model and deploy to production with safety checks.

Frequently Asked Questions about database-migrations

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

FAQPage Schema
How do I safely apply database schema migrations in production?

Safely apply database schema migrations in production by running `npx prisma migrate deploy` in CI/CD pipelines to apply pending migrations, ensuring versioned changes and reliable rollout across environments.

What is the best way to rollback a database migration using Prisma?

The best way to rollback a database migration is following enforced Prisma Migrate best practices for reliable rollback strategies, ensuring predictable recovery and safe schema reversion across development, staging, and production environments.

How do I add a new field to a Prisma schema without causing downtime?

Add a new field to a Prisma schema without causing downtime by applying backward-compatible changes and safe patterns like renames with @map, generating migrations via `npx prisma migrate dev` to prevent production service disruption.

Does this database migration approach support data backfills?

Yes, this database migration approach supports data backfills by providing safe patterns for data migrations alongside schema changes, allowing you to populate new fields and prevent downtime during iterative development and automated deployment.

When should I use prisma migrate dev versus prisma migrate deploy?

Use `prisma migrate dev` during iterative development to generate and apply migrations locally, whereas use `prisma migrate deploy` in automated CI/CD deployment to apply pending migrations to staging and production environments safely.