<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function(Blueprint $table)
{
$table->bigIncrements('id');
$table->string('name', 50);
$table->string('surname', 50);
$table->bigInteger('telephone');
$table->string('email', 50)->unique();
$table->string('username', 50)->unique();
$table->string('password', 50);
$table->boolean('active')->default(FALSE);
$table->string('email_confirmation_code', 6);
$table->enum('notify', ['y', 'n'])->default('y');
$table->rememberToken();
$table->timestamps();
$table->index('username');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}