1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 13:40:20 +02:00

Improve email changing/confirmation stuff

This commit is contained in:
Toby Zerner
2015-05-27 16:24:54 +09:30
parent 8f0989fb80
commit 696bfe5a07
18 changed files with 262 additions and 94 deletions

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateEmailTokensTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('email_tokens', function (Blueprint $table) {
$table->string('id', 100)->primary();
$table->integer('user_id')->unsigned();
$table->string('email', 150);
$table->timestamp('created_at');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('email_tokens');
}
}

View File

@@ -17,8 +17,6 @@ class CreateUsersTable extends Migration
$table->increments('id');
$table->string('username', 100)->unique();
$table->string('email', 150)->unique();
$table->boolean('is_confirmed')->default(0);
$table->string('confirmation_token', 50)->nullable();
$table->boolean('is_activated')->default(0);
$table->string('password', 100);
$table->text('bio')->nullable();