]> git.localhorst.tv Git - alttp.git/blob - database/migrations/2022_04_29_154903_create_discord_bot_commands_table.php
discord bot presence command
[alttp.git] / database / migrations / 2022_04_29_154903_create_discord_bot_commands_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_bot_commands', function (Blueprint $table) {
17                         $table->id();
18                         $table->foreignId('tournament_id')->nullable()->constrained();
19                         $table->foreignId('user_id')->nullable()->constrained();
20                         $table->string('command');
21                         $table->text('parameters')->nullable()->default(null);
22                         $table->string('status')->default('hold');
23                         $table->text('result')->nullable()->default(null);
24                         $table->timestamp('executed_at')->nullable()->default(null);
25                         $table->timestamps();
26                 });
27         }
28
29         /**
30          * Reverse the migrations.
31          *
32          * @return void
33          */
34         public function down()
35         {
36                 Schema::dropIfExists('discord_bot_commands');
37         }
38 };