migration

Generate Laravel-style migration files with up and down methods.

Updated Jul 18, 2022
One-click install
npx skills add https://github.com/milosptr/pos-system --skill migration-milosptr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migration
Source: https://github.com/milosptr/pos-system/tree/main/.claude/skills/migration
Command: npx skills add https://github.com/milosptr/pos-system --skill migration-milosptr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Create a consistent, project-aligned database migration by generating Laravel-style migration files when modifying schema, reducing boilerplate and errors.

Core Features & Use Cases

  • Generates migration files under database/migrations following the project's naming conventions and structure.
  • Includes common fields, data types, and foreign key patterns used across this repository.
  • Provides scaffolding for up() and down() methods to ensure safe rollbacks in deployments.

Quick Start

Describe the schema change, and the tool will generate a Laravel-style migration file in the standard migrations directory.

Frequently Asked Questions about migration

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

FAQPage Schema
How do I generate a Laravel database migration for schema changes?

To generate a Laravel database migration, describe the schema change needed. The tool outputs a migration file in the database/migrations directory with timestamp-based filenames, up and down methods, and common field patterns.

What is the best way to add foreign keys in Laravel migration files?

The best way to add foreign keys in Laravel migration files is by describing the relationship. The tool generates migration code enforcing standard foreign key patterns alongside common fields within the up method.

Can I automatically create rollback methods for Laravel schema alterations?

Yes, you can automatically create rollback methods for Laravel schema alterations. The generator provides scaffolding for both up and down methods to ensure safe rollbacks during deployments.

Does this tool support standard Laravel migration naming conventions?

Yes, this tool supports standard Laravel migration naming conventions. It enforces file placement under database/migrations and applies timestamp-based filenames to maintain project alignment.

How do I reduce boilerplate when removing database columns in Laravel?

To reduce boilerplate when removing database columns in Laravel, describe the elements to drop. The tool generates a project-aligned migration file handling the schema alteration with proper rollback scaffolding.