Wheels Migration Generator

Generate database-agnostic CFWheels migrations with up/down blocks.

203|108|Updated Jan 13, 2011
One-click install
npx skills add https://github.com/wheels-dev/wheels --skill wheels-migration-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Wheels Migration Generator
Source: https://github.com/wheels-dev/wheels/tree/main/.claude/skills/wheels-migration-generator
Command: npx skills add https://github.com/wheels-dev/wheels --skill wheels-migration-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the creation of database-agnostic migrations for CFWheels, preventing the use of database-specific SQL and ensuring cross-database compatibility for all your schema changes. It includes critical fixes for common CLI-generated bugs, saving you from silent failures.

Core Features & Use Cases

  • Schema Management: Generates migrations for creating/altering tables, adding/removing columns, indexes, and foreign keys.
  • Database-Agnostic Code: Emphasizes using CFML date functions and proper formatting to avoid vendor-specific SQL.
  • Critical Bug Fixes: Includes mandatory post-CLI-generation fixes for string boolean parameters and guidance on composite index ordering.
  • Use Case: Need to add a posts table with title, content, and userId columns, plus indexes and a foreign key to users? This skill generates the migration, ensuring it's compatible across different databases and includes crucial fixes to prevent common pitfalls.

Quick Start

Create a new migration file:

wheels g migration CreatePostsTable

Example migration content:

component extends="wheels.migrator.Migration" { function up() { t = createTable(name="posts"); t.string(columnNames="title"); t.create(); } function down() { dropTable("posts"); } }

Frequently Asked Questions about Wheels Migration Generator

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

FAQPage Schema
How do I generate database migrations for CFWheels?

Generate database migrations using the Wheels migration generator, which creates database-agnostic CFML code in app/migrator/migrations with up and down blocks. The generator handles table creation, column modifications, indexes, and foreign keys across all supported database engines.

Can I create cross-database compatible migrations without writing vendor-specific SQL?

Yes, this Skill generates portable migrations that avoid database-specific SQL by using CFML date functions and proper formatting. It ensures your schema changes work consistently across different database engines without manual SQL rewrites.

What common migration bugs does the Wheels generator fix?

The generator includes critical fixes for string boolean parameters and guidance on composite index ordering—issues that typically cause silent failures in CLI-generated migrations, ensuring your schema changes execute correctly.

How do I add tables, columns, indexes, and foreign keys in a single migration?

Specify all schema changes—table creation, column definitions, indexes, and foreign key relationships—in a single migration file. The generator structures these with proper up and down blocks, providing complete rollback support.

Does the migration generator support rollback functionality?

Yes, every generated migration includes both up and down blocks with error handling, allowing you to safely rollback schema changes to a previous state when needed.