Back to Commands

Create Database Migrations

Commands setup 335 Scanned by NVIDIA SkillSpector

Create and manage database migrations with proper versioning and rollback support

Install Command
npx claude-code-templates@latest --command setup/create-database-migrations
View on GitHub
claude-code — create-database-migrations

Scanned by NVIDIA SkillSpector

Automated static analysis (no LLM) · v2.12.0 · 2026-10-23

Partial analysis: some checks could not run on this component.

0 observations
scanner score 0/100

SkillSpector looks for patterns such as shell commands, credential access, network calls or unpinned dependencies. An observation is something worth reading in the files before you install, not a confirmed vulnerability. Components that run code locally, like hooks, MCP servers and security tooling, naturally show more of them.

No observations.

Learn more about NVIDIA SkillSpector.

Content

Create Database Migrations

Create and manage database migrations: $ARGUMENTS

Current Database State

  • ORM detection: @package.json or @requirements.txt (detect Sequelize, Prisma, Alembic, etc.)
  • Migration files: !find . -name "*migration*" -type f | head -5
  • Database config: @config/database.* or @prisma/schema.prisma
  • Current schema: !ls migrations/ 2>/dev/null | wc -l migrations found

Task

Create comprehensive database migrations with proper versioning and rollback capabilities:

Migration Types: Use $ARGUMENTS to specify table creation, column addition, table alteration, or data migration

Migration Framework:

  1. Migration Planning - Analyze schema changes, dependencies, and data impact
  2. Migration Generation - Create timestamped migration files with up/down methods
  3. Schema Updates - Table creation, column modifications, index management
  4. Data Migrations - Safe data transformations and backfills
  5. Rollback Strategy - Implement reliable rollback procedures for each change
  6. Testing - Validate migrations in development and staging environments

Best Practices: Follow database-specific conventions, maintain referential integrity, handle large datasets efficiently, and ensure zero-downtime deployments.

Output: Production-ready migration files with comprehensive rollback support, proper indexing, and data safety measures.

Stack Builder

0 components

Your stack is empty

Browse components and click the + button to add them to your stack for easy installation.