commandbox-migrations

Run and manage database migrations from the CommandBox CLI.

1|Updated Apr 10, 2026
One-click install
npx skills add https://github.com/ColdBox/skills --skill commandbox-migrations
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: commandbox-migrations
Source: https://github.com/ColdBox/skills/tree/main/modules/commandbox-migrations
Command: npx skills add https://github.com/ColdBox/skills --skill commandbox-migrations

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides clear, repeatable guidance to create, apply, rollback, refresh, and seed database migrations using the CommandBox migrate CLI, reducing deployment errors and schema drift across environments.

Core Features & Use Cases

  • Create and Apply Migrations: Generate timestamped migration files and run pending migrations consistently across environments.
  • Rollback, Reset, and Refresh: Perform targeted rollbacks, full resets, or destructive refreshes with optional seeding for development workflows.
  • CI/CD and Production Safety: Install the migration tracking table in CI, run migrations during deployments, and adopt safe production patterns such as only running migrate up.
  • Configuration Management: Support named connections and settings via .cfmigrations or box.json and common drivers including MSSQL, MySQL, PostgreSQL, and SQLite.

Quick Start

Use the CommandBox migrate commands to install the migrations table and run pending migrations for your application environment.

Frequently Asked Questions about commandbox-migrations

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

FAQPage Schema
How do I run database migrations safely from the CommandBox CLI?

Database migrations run safely from the CommandBox CLI by installing the cfmigrations tracking table and applying pending schema changes, using safe production patterns like only running migrate up to prevent unintended rollbacks during deployments.

How do I create and apply timestamped migration files for my database schema?

Timestamped migration files are created and applied through CommandBox migrate commands, generating consistent schema changes across local development, CI/CD pipelines, and production environments to reduce deployment errors and schema drift.

Does CommandBox migrations support MySQL, PostgreSQL, MSSQL, and SQLite drivers?

CommandBox migrations supports MSSQL, MySQL, PostgreSQL, and SQLite drivers, allowing configuration of named connections and settings via .cfmigrations or box.json files for consistent schema management across different database platforms.

What is the best way to rollback and refresh database migrations during development?

The best way to rollback and refresh database migrations during development is using CommandBox migrate commands to perform targeted rollbacks, full resets, or destructive refreshes with optional seeding to quickly rebuild your schema state.

How do I run database seeders when resetting my development database?

Database seeders run when resetting your development database by executing CommandBox migrate refresh commands with optional seeding, which destructively refreshes the schema and populates it with seed data for local development workflows.

Why should I only run migrate up in production CI/CD pipelines?

You should only run migrate up in production CI/CD pipelines because rollback and refresh commands are destructive operations that can cause data loss, so applying pending migrations exclusively ensures safe, forward-only schema changes during deployments.