File: /var/www/ipsremont-demo/database/migrations/2014_10_12_000000_create_users_table.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->id();
$table->string('name')->comment('Имя польльзователя');
$table->string('email')->comment('email он же логин');
$table->string('additional_email')->nullable()->comment('дополнительный email');
$table->timestamp('email_verified_at')->nullable();
$table->string('password')->comment('пароль');
$table->integer('access_system')->default(0)->comment('доступ в сау 1-да 0-запрещено');
$table->string('phone')->nullable()->comment('тедефон');
$table->string('additional_phone')->nullable()->comment('дополнительный телефон');
$table->string('lang')->comment('Язык пользователя');
$table->integer('branch_id')->nullable()->comment('Филиал');
$table->timestamp('dt_last_auth')->nullable()->comment('Дата последнего входа, если не заполнено юзер не заходил ни разу');
$table->rememberToken();
$table->softDeletes();
$table->timestamp('created_at')->nullable()->useCurrent();
$table->timestamp('updated_at')->nullable()->useCurrent();
$table->unique(['email', 'deleted_at']);
});
}
/**
* Reverse the migrations.
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}