Add bot logs
All checks were successful
Deploy App / deploy (push) Successful in 11s

This commit is contained in:
2025-08-31 21:54:18 +02:00
parent 77ebc6bce1
commit 378355ad5b
16 changed files with 355 additions and 20 deletions

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('bot_logs', function (Blueprint $table) {
$table->id();
$table->foreignId('bot_id');
$table->timestamp('started_at')->nullable();
$table->timestamp('finished_at')->nullable();
$table->string('status')->default('pending'); // pending, running, success, failed
$table->text('output')->nullable(); // store raw response/log text
$table->text('error')->nullable(); // store error message/trace if failed
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('bot_logs');
}
};