This commit is contained in:
@@ -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');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user