dummybot/database/migrations/2026_06_16_215608_create_tasks_table.php

27 lines
723 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('tasks', function (Blueprint $table) {
$table->id();
$table->string('title', 120);
$table->enum('priority', ['low', 'med', 'high'])->default('med');
$table->boolean('done')->default(false);
$table->timestamp('snooze_until')->nullable();
$table->timestamp('done_at')->nullable();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('tasks');
}
};