coldbox-orm-database-migrations

Manage ColdBox database schema migrations and seeding with cfmigrations.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Manage schema changes, rollbacks, and seed data across environments so teams can evolve ColdBox application databases safely and reproducibly without manual SQL edits.

Core Features & Use Cases

  • Declarative Migrations: Define schema changes using the SchemaBuilder API to create, alter, rename, and drop tables and columns.
  • Indexes & Relationships: Add indexes, unique constraints, primary keys, and foreign keys with cascade rules to enforce data integrity.
  • Seeding & Data Migrations: Write seeders and run QB queries to populate or migrate data as part of migration steps.
  • CLI Integration: Use commandbox-migrations and cfmigrations to create migration files, run migrations, rollback batches, reset, and seed databases in CI or local workflows.

Quick Start

Create a new migration named create_users_table, implement up and down with SchemaBuilder, and run box migrate up to apply it.

Frequently Asked Questions about coldbox-orm-database-migrations

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

FAQPage Schema
How do I manage database schema migrations in a ColdBox application?

Database schema migrations in a ColdBox application are managed using commandbox-migrations and cfmigrations to create, run, rollback, and reset schema changes declaratively via the SchemaBuilder API without manual SQL edits.

How do I create and run a new database migration using CommandBox?

To create and run a database migration using CommandBox, generate a migration file, implement the up and down methods with SchemaBuilder table operations, and execute the box migrate up command to apply the schema changes.

Can I use QB queries for data migrations and seeding in cfmigrations?

Yes, cfmigrations supports writing seeders and running QB queries to populate or migrate data, allowing you to execute data migrations alongside schema changes within your ColdBox workflow.

How do I add indexes and foreign keys with cascade rules in a ColdBox migration?

You add indexes, unique constraints, primary keys, and foreign keys with cascade rules in a ColdBox migration by utilizing the SchemaBuilder API to enforce data integrity when defining or altering database tables.

What is the best way to roll back database migrations in a ColdBox environment?

The best way to roll back database migrations in a ColdBox environment is using CommandBox CLI commands to rollback migration batches or reset the database, ensuring safe and reproducible schema reversions across local and CI workflows.

Do I need cfmigrations to evolve ColdBox database schemas safely across environments?

Yes, you need cfmigrations and commandbox-migrations to version and evolve ColdBox database schemas safely, allowing teams to apply schema changes, rollbacks, and seed data reproducibly across different environments.