diff options
Diffstat (limited to 'src/migrations')
-rw-r--r-- | src/migrations/2015_05_13_105945_botleaguesapi-create_password_reminders.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/migrations/2015_05_13_105945_botleaguesapi-create_password_reminders.php b/src/migrations/2015_05_13_105945_botleaguesapi-create_password_reminders.php new file mode 100644 index 0000000..a2473fb --- /dev/null +++ b/src/migrations/2015_05_13_105945_botleaguesapi-create_password_reminders.php @@ -0,0 +1,36 @@ +<?php + +use Illuminate\Database\Schema\Blueprint; +use Illuminate\Database\Migrations\Migration; + +class BotleaguesApiCreatePasswordReminders extends Migration { + + /** + * Run the migrations. + * + * @return void + */ + public function up() + { + Schema::create('password_reminders', function(Blueprint $table) + { + $table->integer('userId')->unsigned(); + $table->foreign('userId')->references('id')->on('users'); + $table->string('token')->index(); + $table->timestamp('created_at'); + $table->timestamp('valid_till'); + $table->timestamp('used_at')->nullable(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('password_reminders'); + } + +} |