]> git.localhorst.tv Git - alttp.git/blob - database/migrations/2024_04_09_122502_create_chat_bot_logs_table.php
protocol chat bot messages
[alttp.git] / database / migrations / 2024_04_09_122502_create_chat_bot_logs_table.php
1 <?php
2
3 use Illuminate\Database\Migrations\Migration;
4 use Illuminate\Database\Schema\Blueprint;
5 use Illuminate\Support\Facades\Schema;
6
7 return new class extends Migration
8 {
9         /**
10          * Run the migrations.
11          */
12         public function up(): void
13         {
14                 Schema::create('chat_bot_logs', function (Blueprint $table) {
15                         $table->id();
16                         $table->timestamps();
17                         $table->foreignId('channel_id')->constrained();
18                         $table->foreignId('origin_id')->nullable()->default(null);
19                         $table->string('origin_type')->nullable()->default(null);
20                         $table->text('text');
21                 });
22         }
23
24         /**
25          * Reverse the migrations.
26          */
27         public function down(): void
28         {
29                 Schema::dropIfExists('chat_bot_logs');
30         }
31 };