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:
32
migrations/2015_02_24_000000_create_email_tokens_table.php
Normal file
32
migrations/2015_02_24_000000_create_email_tokens_table.php
Normal 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');
|
||||
}
|
||||
}
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user