bigIncrements('id'); $table->string('linkedid', 100); $table->string('direction', 10)->default('inbound'); $table->unsignedInteger('company_id')->nullable(); $table->unsignedInteger('user_id')->nullable(); $table->unsignedBigInteger('provider_id')->nullable(); $table->string('provider_driver', 50)->nullable(); $table->string('status', 20)->default('queued'); $table->longText('summary')->nullable(); $table->longText('transcript')->nullable(); $table->string('language', 20)->nullable(); $table->unsignedInteger('audio_seconds')->nullable(); $table->unsignedBigInteger('audio_bytes')->nullable(); $table->text('error')->nullable(); $table->json('meta')->nullable(); $table->timestamp('started_at')->nullable(); $table->timestamp('completed_at')->nullable(); $table->timestamps(); $table->index(['linkedid', 'id']); $table->index('status'); $table->index('company_id'); }); } public function down(): void { Schema::dropIfExists('call_ai_analyses'); } };