resources/boost/skills/migrations/SKILL.md
Database schema change files. Always create new files for changes — never modify existing migrations. Use descriptive names, proper foreign key constraints, and reversible `down()` methods.
npx skillsauth add codebar-ag/coding-guidelines migrationsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
dropColumn, type changes, destructive renames) are reviewed with backup/rollback plan.add_status_to_invoices_table.php artisan make:migration add_status_to_invoices_table --table=invoicesup() with Focused Changesdown() Reversalup() where possible.php artisan migrate and php artisan migrate:rollback --step=1 locally.$table->dropTimestamps(); (drops created_at and updated_at together).public function up(): void
{
Schema::create('invoices', function (Blueprint $table) {
$table->id();
$table->foreignId('order_id')->constrained()->cascadeOnDelete();
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
$table->string('status')->default('draft');
$table->decimal('amount', 10, 2);
$table->date('due_date');
$table->timestamp('paid_at')->nullable();
$table->timestamps();
$table->index('status');
});
}
public function down(): void
{
Schema::dropIfExists('invoices');
}
// Adding a column to an existing table
public function up(): void
{
Schema::table('invoices', function (Blueprint $table) {
$table->string('reference')->nullable()->after('status');
});
}
public function down(): void
{
Schema::table('invoices', function (Blueprint $table) {
$table->dropColumn('reference');
});
}
// Dropping timestamps explicitly (schema reversal only, not data recovery)
public function up(): void
{
Schema::table('invoices', function (Blueprint $table) {
$table->dropTimestamps();
});
}
public function down(): void
{
Schema::table('invoices', function (Blueprint $table) {
$table->timestamps();
});
}
up() and down() are implemented and tested locally.down() method or leaving it emptydraft, paid, cancelled)down() can recover data that was dropped in up()resources/boost/skills/models/SKILL.md (schema-to-model alignment)resources/boost/skills/enums/SKILL.md (status value conventions)testing
Translation and localization conventions for Laravel. Use when adding user-facing strings, creating translation files, or working with lang/ directory.
tools
Reusable behaviour shared across multiple unrelated classes. Traits provide shared Eloquent scopes, accessors, lifecycle hooks, and small stateless helper methods.
development
Tailwind CSS v4 styling conventions. Use when working with CSS, Tailwind utilities, or customizing the theme in Laravel projects.
development
Orchestration classes that coordinate multiple Actions, external APIs, or domain operations into a cohesive workflow. Services own transaction boundaries and third-party API integrations.