string('case_intake', 12)->default('off'); }); Schema::create('intake_observations', function (Blueprint $table): void { $table->id(); $table->foreignId('tenant_id')->nullable()->constrained()->cascadeOnDelete(); $table->foreignId('channel_id')->constrained()->cascadeOnDelete(); $table->foreignId('blocked_period_id')->nullable()->constrained()->nullOnDelete(); $table->foreignId('portal_email_id')->nullable()->constrained()->nullOnDelete(); $table->foreignId('booking_id')->nullable()->constrained()->nullOnDelete(); $table->string('fingerprint', 64); $table->string('source', 12); $table->string('mode', 12); $table->string('outcome', 20); $table->boolean('applied')->default(false); $table->string('case_type', 4)->nullable(); $table->date('starts_on')->nullable(); $table->date('ends_on')->nullable(); $table->string('reference', 100)->nullable(); $table->json('reasons')->nullable(); $table->json('missing')->nullable(); $table->timestamp('occurred_at'); $table->timestamps(); $table->unique(['tenant_id', 'fingerprint']); $table->index(['channel_id', 'occurred_at']); }); Schema::table('channel_tasks', function (Blueprint $table): void { $table->string('proof', 12)->nullable(); $table->text('proof_note')->nullable(); $table->timestamp('proof_at')->nullable(); $table->string('proof_by')->nullable(); }); } public function down(): void { Schema::table('channel_tasks', function (Blueprint $table): void { $table->dropColumn(['proof', 'proof_note', 'proof_at', 'proof_by']); }); Schema::dropIfExists('intake_observations'); Schema::table('channels', function (Blueprint $table): void { $table->dropColumn('case_intake'); }); } };