aboutsummaryrefslogtreecommitdiff
path: root/src/migrations/2015_04_26_192035_botleaguesapi-create_participants.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/migrations/2015_04_26_192035_botleaguesapi-create_participants.php')
-rw-r--r--src/migrations/2015_04_26_192035_botleaguesapi-create_participants.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/migrations/2015_04_26_192035_botleaguesapi-create_participants.php b/src/migrations/2015_04_26_192035_botleaguesapi-create_participants.php
new file mode 100644
index 0000000..9b76316
--- /dev/null
+++ b/src/migrations/2015_04_26_192035_botleaguesapi-create_participants.php
@@ -0,0 +1,36 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class BotleaguesapiCreateParticipants extends Migration {
+
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::create('participants', function(Blueprint $table)
+ {
+ $table->increments('id');
+ $table->integer('botId')->unsigned();
+ $table->foreign('botId')->references('id')->on('bots');
+ $table->integer('competitionId')->unsigned();
+ $table->foreign('competitionId')->references('id')->on('competitions');
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::drop('participants');
+ }
+
+}