laravel:migrations-and-factories

Manage Laravel database migrations, models, factories, and seed data.

1|Updated Sep 22, 2025
One-click install
npx skills add https://github.com/meistro57/chat_bridge --skill laravel-migrations-and-factories
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel:migrations-and-factories
Source: https://github.com/meistro57/chat_bridge/tree/main/.claude/skills/migrations-and-factories
Command: npx skills add https://github.com/meistro57/chat_bridge --skill laravel-migrations-and-factories

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides guidance on managing database schema changes in Laravel applications, ensuring safety, testability, and reversibility. It addresses the common challenges of modifying existing migrations and structuring database seeding.

Core Features & Use Cases

  • Migration Management: Best practices for creating, modifying, and rolling back database migrations.
  • Model-Migration Pairing: Ensures that every new model is accompanied by its corresponding migration and factory.
  • Seeding Guidance: Recommendations for creating realistic yet minimal datasets for seeding.
  • Use Case: When developing a new feature, you need to add a new table and its associated model. This Skill guides you on how to create a migration for the table, a factory for test data, and the model itself, ensuring they are all linked and managed correctly.

Quick Start

Use the laravel:migrations-and-factories skill to create a new model named 'User' with its migration and factory.

Frequently Asked Questions about laravel:migrations-and-factories

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

FAQPage Schema
How do I safely modify existing Laravel database migrations?

To safely modify existing Laravel database migrations, create new migration files rather than editing old ones. This approach ensures schema changes remain reversible and prevents database state corruption during team collaboration.

What is the best way to set up Laravel models, migrations, and factories together?

The best way to set up Laravel models, migrations, and factories is to pair them during creation. This Skill guides you in linking all three components together, ensuring test data generation and schema management stay synchronized.

How do I structure database seeding and factories for Laravel integration tests?

Structure Laravel database seeding and factories by creating realistic yet minimal datasets within database transactions. This Skill provides rules for structuring seed data and supports integration testing by generating isolated test data via factories.

Does this Laravel migration approach support reversible schema changes?

Yes, this Laravel migration approach supports reversible schema changes by emphasizing safe rollback patterns. It provides best practices for creating, modifying, and rolling back database migrations without losing existing data.

Why should I use Laravel factories instead of manual database seeding?

You should use Laravel factories instead of manual database seeding to generate consistent, minimal test datasets automatically. Factories integrate directly with models and migrations, ensuring test data accurately reflects your actual database schema.