Database Migration

Create and modify Laravel migrations, seeders, and factories with templates.

4|1|Updated Sep 25, 2025
One-click install
npx skills add https://github.com/gmedia/erp --skill database-migration-gmedia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Database Migration
Source: https://github.com/gmedia/erp/tree/main/.agent/skills/database-migration
Command: npx skills add https://github.com/gmedia/erp --skill database-migration-gmedia

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Panduan praktis untuk membuat dan memodifikasi migration, seeder, dan factory Laravel secara aman dan terstandar, mengurangi risiko kesalahan konfigurasi database.

Core Features & Use Cases

  • Panduan pola migrasi, penambahan kolom, dan pembuatan foreign key sesuai best practices Laravel.
  • Template file untuk migration (create_table, add_column), factory, dan seeder agar setup database konsisten.
  • Use Case: mempercepat pembuatan skema data pada proyek Laravel dengan seeding data master.

Quick Start

Jalankan skema panduan ini untuk mulai membuat migration, seeder, dan factory secara konsisten.

Frequently Asked Questions about Database Migration

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

FAQPage Schema
How do I create safe Laravel migrations for adding columns and foreign keys?

Safe Laravel migrations require standardized templates for adding columns and creating foreign keys to prevent schema configuration errors. This approach provides specific patterns and structural guidance to ensure your database schema modifications remain consistent and secure before deployment.

What is the best way to generate Laravel seeders and model factories?

Generating Laravel seeders and model factories is best handled by using dedicated file templates that ensure consistent data generation setup. Utilizing standardized templates for factories and seeders accelerates the creation of master data and testing structures within your Laravel projects.

Do I need to validate my database schema before running Laravel migrations?

Yes, you need to validate your database schema before running Laravel migrations to reduce the risk of configuration errors. Following functional requirements and best practices for schema validation ensures your migration files are safe to deploy and structurally sound.

Can I use standardized templates for Laravel database schema creation?

Yes, you can use standardized templates for Laravel database schema creation to maintain consistency across your project. Templates for creating tables, adding columns, and defining seed data provide a reliable framework that speeds up safe database setup.

Why does my Laravel migration setup lack consistency across different environments?

Laravel migration setup lacks consistency when standard file templates for migrations, seeders, and factories are not used. Applying defined best practices and standardized templates ensures your database schema and seeding processes remain uniform across all deployment environments.