]> git.localhorst.tv Git - alttp.git/blob - 2024_04_09_161510_chat_log_category.php
1790f86f14e9910711b647c3bfb145dbc5d88c82
[alttp.git] / 2024_04_09_161510_chat_log_category.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::table('chat_logs', function (Blueprint $table) {
15                         $table->string('twitch_category')->default('');
16                         $table->index(['twitch_category']);
17                 });
18         }
19
20         /**
21          * Reverse the migrations.
22          */
23         public function down(): void
24         {
25                 Schema::table('chat_logs', function (Blueprint $table) {
26                         $table->dropColumn('twitch_category');
27                 });
28         }
29 };