pingcrm/database/migrations/2020_01_01_000004_create_us...

42 lines
1.1 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->integer('account_id')->index();
$table->string('first_name', 25);
$table->string('last_name', 25);
$table->string('email', 50)->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password')->nullable();
$table->boolean('owner')->default(false);
$table->string('photo_path', 100)->nullable();
$table->rememberToken();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}