laravel:migrations-and-factories

Automate Laravel database migrations, factories, and seed data workflows.

Updated Apr 7, 2026
One-click install
npx skills add https://github.com/Sivanwol/sabo-platfom --skill laravel-migrations-and-factories-sivanwol
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: laravel:migrations-and-factories
Source: https://github.com/Sivanwol/sabo-platfom/tree/main/.agents/skills/laravel-migrations-and-factories
Command: npx skills add https://github.com/Sivanwol/sabo-platfom --skill laravel-migrations-and-factories-sivanwol

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safe database change patterns; when to modify vs add migrations; always pair models with migrations and factories; seeding guidance

Core Features & Use Cases

  • Pair each new model with a migration and a factory to ensure consistent schema evolution.
  • Do not edit migrations that have already been merged to main; create new migrations instead.
  • Use seeds to populate realistic test data and keep datasets lean.

Quick Start

Create a new model with a migration and a factory using Laravel's artisan command.

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 handle safe database migrations in Laravel without breaking existing tables?▼

Safe Laravel migrations require creating new migration files to evolve the schema rather than editing merged migrations. This immutable approach ensures consistent database evolution without breaking existing application functionality.

What's the best way to generate deterministic test data in Laravel?▼

Laravel factories provide deterministic test data by pairing each model with a factory definition. This enables consistent test datasets and allows tests to run reliably using transaction strategies for database rollback.

When do I need to pair a Laravel model with a migration and a factory?▼

Pair a Laravel model with a migration and a factory during feature development to ensure consistent schema evolution. This practice guarantees that database structure and test data generation remain synchronized across the application lifecycle.

Why should I use seeders to populate test data in Laravel?▼

Laravel seeders populate realistic test data to keep datasets lean and deterministic. Using seeders ensures that your development and testing environments maintain consistent, manageable records for reliable application testing.

Can I edit a Laravel migration after it has been merged to main?▼

You should not edit merged Laravel migrations; create new migrations instead. Modifying merged migrations disrupts database evolution tracking and creates inconsistencies across different deployment environments and team members' local databases.