]> git.localhorst.tv Git - alttp.git/blobdiff - 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
diff --git a/database/migrations/2022_04_29_154903_create_discord_bot_commands_table.php b/database/migrations/2022_04_29_154903_create_discord_bot_commands_table.php
new file mode 100644 (file)
index 0000000..388240e
--- /dev/null
@@ -0,0 +1,38 @@
+<?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::create('discord_bot_commands', function (Blueprint $table) {
+                       $table->id();
+                       $table->foreignId('tournament_id')->nullable()->constrained();
+                       $table->foreignId('user_id')->nullable()->constrained();
+                       $table->string('command');
+                       $table->text('parameters')->nullable()->default(null);
+                       $table->string('status')->default('hold');
+                       $table->text('result')->nullable()->default(null);
+                       $table->timestamp('executed_at')->nullable()->default(null);
+                       $table->timestamps();
+               });
+       }
+
+       /**
+        * Reverse the migrations.
+        *
+        * @return void
+        */
+       public function down()
+       {
+               Schema::dropIfExists('discord_bot_commands');
+       }
+};