aboutsummaryrefslogtreecommitdiff
path: root/src/migrations
diff options
context:
space:
mode:
Diffstat (limited to 'src/migrations')
-rw-r--r--src/migrations/2015_05_10_134654_botleaguesapi-create_user_tokens.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/migrations/2015_05_10_134654_botleaguesapi-create_user_tokens.php b/src/migrations/2015_05_10_134654_botleaguesapi-create_user_tokens.php
new file mode 100644
index 0000000..3d8c82e
--- /dev/null
+++ b/src/migrations/2015_05_10_134654_botleaguesapi-create_user_tokens.php
@@ -0,0 +1,36 @@
+<?php
+
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class BotleaguesapiCreateUserTokens extends Migration {
+
+ /**
+ * Run the migrations.
+ *
+ * @return void
+ */
+ public function up()
+ {
+ Schema::create('user_tokens', function(Blueprint $table)
+ {
+ $table->increments('id');
+ $table->integer('userId')->unsigned();
+ $table->foreign('userId')->references('id')->on('users');
+ $table->string('token');
+ $table->timestamp('valid_till');
+ $table->timestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::drop('user_tokens');
+ }
+
+}