2018-04-15 23:56:48 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
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) {
|
2018-05-20 02:56:20 +00:00
|
|
|
$table->bigIncrements('id');
|
2018-04-16 00:12:07 +00:00
|
|
|
$table->string('name')->nullable();
|
|
|
|
$table->string('username')->nullable()->unique()->index();
|
2018-04-15 23:56:48 +00:00
|
|
|
$table->string('email')->unique();
|
|
|
|
$table->string('password');
|
|
|
|
$table->rememberToken();
|
2018-04-16 00:12:07 +00:00
|
|
|
$table->boolean('is_admin')->default(false);
|
|
|
|
$table->timestamp('email_verified_at')->nullable();
|
2018-04-15 23:56:48 +00:00
|
|
|
$table->timestamps();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('users');
|
|
|
|
}
|
|
|
|
}
|