Files
CABM-IT/database/migrations/2026_08_16_160000_create_todos_table.php
T
jeremy bayse 8f22dca9c8 Initial commit: CABM-IT (ItGlue-style MSP documentation platform)
Laravel 13 + Livewire/Volt app for managing client organizations,
documents, passwords, flexible assets, virtual machines, contacts,
domains, todos, shortcuts, and role-based user administration.
2026-08-16 13:28:12 +02:00

35 lines
1.2 KiB
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('todos', function (Blueprint $table) {
$table->id();
$table->foreignId('organization_id')->constrained()->cascadeOnDelete();
$table->string('title');
$table->text('description')->nullable();
$table->string('category'); // infra|support|metier|autre
$table->string('criticality')->default('medium'); // low|medium|high|urgent
$table->date('due_date')->nullable();
$table->foreignId('assigned_to')->nullable()->constrained('users')->nullOnDelete();
$table->boolean('is_done')->default(false);
$table->timestamp('completed_at')->nullable();
$table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
$table->timestamps();
$table->softDeletes();
$table->index(['organization_id', 'is_done']);
});
}
public function down(): void
{
Schema::dropIfExists('todos');
}
};