Create Database Migrations
Create and manage database migrations with proper versioning and rollback support
$ npx claude-code-templates@latest --command="setup/create-database-migrations" --yesRequires Claude Code. The command adds this command to your project's .claudedirectory — nothing runs on ToolZip's servers.
What's inside this command
Component source
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 -lmigrations 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:- Migration Planning - Analyze schema changes, dependencies, and data impact
- Migration Generation - Create timestamped migration files with up/down methods
- Schema Updates - Table creation, column modifications, index management
- Data Migrations - Safe data transformations and backfills
- Rollback Strategy - Implement reliable rollback procedures for each change
- Testing - Validate migrations in development and staging environments
Related Claude Code Commands
Design Database Schema
Design optimized database schemas with proper relationships, constraints, and performance considerations
Setup Docker Containers
Setup Docker containerization with multi-stage builds and development workflows
Setup Development Environment
Setup comprehensive development environment with tools, configurations, and workflows
Setup Linting
Configure comprehensive code linting and quality analysis tools with automated enforcement
Design Rest Api
Design RESTful API architecture with comprehensive endpoints, authentication, and documentation
Update Dependencies
Update and modernize project dependencies with comprehensive testing and compatibility checks
Catalog data and component content are sourced from the open-source davila7/claude-code-templates project (MIT license). ToolZip curates the listing and writes original descriptions; every component links back to its original source. Claude Code is a product of Anthropic. ToolZip is an independent catalog and is not affiliated with or endorsed by Anthropic.