Back to list
iurygdeoliveira

scaffold-migration

by iurygdeoliveira

Repositorio destinado a fornecer um kit inicial para desenvolvimento de SaaS usando laravel e filament

29🍴 12📅 Jan 20, 2026

SKILL.md


name: scaffold-migration description: Automates the creation of Laravel Migrations using anonymous classes, correct foreign key constraints, and UUIDs where applicable.

Laravel Migration Scaffold Skill

Use this skill when creating database table definitions.

Rules

1. Anonymous Classes

  • Always use return new class extends Migration.

2. 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().

3. ID and UUIDs

  • Check if the project or related models use UUIDs.
  • If UUID: $table->uuid('id')->primary();
  • If ID: $table->id();

4. Indexing

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

Workflow

  1. Ask: "Does this table relate to existing models?"
  2. If yes, check the parent model's ID type (int or uuid) to ensure the foreign key matches.
  3. Write the migration file.

Score

Total Score

80/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

+5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

Reviews

💬

Reviews coming soon