pixelfed/database/migrations/2014_10_12_000000_create_users_table.php

39 lines
953 B
PHP
Raw Permalink Normal View History

2018-04-15 23:56:48 +00:00
<?php
use Illuminate\Database\Migrations\Migration;
2018-08-28 03:07:36 +00:00
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
2018-04-15 23:56:48 +00:00
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$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');
}
}