Files
muninn/database/migrations/2026_07_18_114506_create_sites_table.php
T
Doar MihaiandClaude Sonnet 5 889ac9b7f9 feat: add Site model, migration, and factory
Implements Task 2: creates the Site model with fillable name, url, and
description fields; the corresponding database migration; and a factory
for generating test data. Includes TDD tests verifying model creation
with and without optional description.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-18 14:45:55 +03:00

25 lines
561 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('sites', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('url');
$table->text('description')->nullable();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('sites');
}
};