mein-sterntours/database/migrations/2014_10_12_000000_create_users_table.php
2021-11-09 18:38:44 +01:00

64 lines
1.6 KiB
PHP
Executable file

<?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) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->string('secret_key', 50);
$table->boolean('google2fa')->default(false);
$table->boolean('confirmed')->default(false);
$table->string('confirmation_code', 30)->index()->nullable();
$table->timestamp('confirmation_date')->nullable();
$table->dateTime('confirmation_code_to')->nullable();
$table->unsignedTinyInteger('confirmation_code_remider')->default(0);
$table->boolean('active')->default(false);
$table->timestamp('active_date')->nullable();
$table->dateTime('agreement')->nullable();
$table->boolean('admin')->default(false);
$table->string('identify');
$table->char('lang', 2)->index();
$table->rememberToken();
$table->timestamp('last_login')->nullable();
$table->string('permissions');
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}