id(); $t->foreignId('user_id')->constrained()->cascadeOnDelete(); $t->foreignId('project_id')->nullable()->constrained()->nullOnDelete(); $t->string('title', 120); $t->text('description')->nullable(); $t->enum('priority', ['low', 'med', 'high'])->default('med'); $t->unsignedSmallInteger('estimate_min')->nullable(); // estimación en min $t->timestamp('deadline')->nullable(); $t->string('recurrence', 30)->nullable(); // 'daily', 'weekly', null $t->boolean('done')->default(false); $t->timestamp('done_at')->nullable(); $t->timestamp('snooze_until')->nullable(); $t->timestamps(); $t->index(['user_id', 'done', 'snooze_until']); }); } public function down(): void { Schema::dropIfExists('tasks'); } };