scaffold-migration

Laravel Migration Scaffold Skill

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "scaffold-migration" with this command: npx skills add iurygdeoliveira/labsis-kit/iurygdeoliveira-labsis-kit-scaffold-migration

Laravel Migration Scaffold Skill

Use this skill when creating database table definitions.

Rules

  1. Anonymous Classes
  • Always use return new class extends Migration .
  1. Foreign Keys
  • Standard: Use foreignIdFor() constrained to the model class. $table->foreignIdFor(\App\Models\User::class)->constrained()->cascadeOnDelete();

  • Nullable: usage of ->nullable() comes before constrained() .

  1. ID and UUIDs
  • Check if the project or related models use UUIDs.

  • If UUID: $table->uuid('id')->primary();

  • If ID: $table->id();

  1. Indexing
  • Add indexes to columns that will be frequently searched or used in WHERE clauses (e.g., slug , email , status ).

Workflow

  • Ask: "Does this table relate to existing models?"

  • If yes, check the parent model's ID type (int or uuid) to ensure the foreign key matches.

  • Write the migration file.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

scaffold-filament-resource

No summary provided by upstream source.

Repository SourceNeeds Review
General

scaffold-filament-page

No summary provided by upstream source.

Repository SourceNeeds Review
General

scaffold-controller

No summary provided by upstream source.

Repository SourceNeeds Review
General

manage-seeders

No summary provided by upstream source.

Repository SourceNeeds Review