]> git.localhorst.tv Git - alttp.git/blob - database/migrations/2022_04_27_085723_create_discord_channels_table.php
open tournament type
[alttp.git] / database / migrations / 2022_04_27_085723_create_discord_channels_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          * @return void
13          */
14         public function up()
15         {
16                 Schema::create('discord_channels', function (Blueprint $table) {
17                         $table->id();
18                         $table->foreignId('discord_guild_id')->nullable()->default(null)->constrained();
19                         $table->string('channel_id')->unique();
20                         $table->string('name');
21                         $table->integer('type');
22                         $table->integer('position');
23                         $table->boolean('private');
24                         $table->timestamps();
25                 });
26         }
27
28         /**
29          * Reverse the migrations.
30          *
31          * @return void
32          */
33         public function down()
34         {
35                 Schema::dropIfExists('discord_channels');
36         }
37 };