--- /dev/null
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+return new class extends Migration
+{
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::table('chat_logs', function (Blueprint $table) {
+ $table->timestamp('evaluated_at')->nullable()->default(null);
+ $table->foreignId('user_id')->nullable()->default(null)->constrained();
+ $table->foreignId('channel_id')->nullable()->default(null)->constrained();
+ $table->string('type')->default('');
+ $table->text('text_content')->nullable()->default(null);
+ $table->boolean('banned')->default(false);
+ $table->index(['type', 'banned']);
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::table('chat_logs', function (Blueprint $table) {
+ $table->dropColumn('evaluated_at');
+ $table->dropForeign(['user_id']);
+ $table->dropColumn('user_id');
+ $table->dropForeign(['channel_id']);
+ $table->dropColumn('channel_id');
+ $table->dropColumn('type');
+ $table->dropColumn('text_content');
+ $table->dropColumn('banned');
+ });
+ }
+};