]> git.localhorst.tv Git - alttp.git/blob - database/migrations/2024_04_09_160015_channel_twitch_info.php
track twitch category where chats were sent in
[alttp.git] / database / migrations / 2024_04_09_160015_channel_twitch_info.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('channels', function (Blueprint $table) {
15                         $table->boolean('twitch_live')->default(false);
16                         $table->string('twitch_category')->default('');
17                         $table->integer('twitch_viewers')->default(0);
18                 });
19         }
20
21         /**
22          * Reverse the migrations.
23          */
24         public function down(): void
25         {
26                 Schema::table('channels', function (Blueprint $table) {
27                         $table->dropColumn('twitch_live');
28                         $table->dropColumn('twitch_category');
29                         $table->dropColumn('twitch_viewers');
30                 });
31         }
32 };