2016-06-17 07:06:38 -05:00
|
|
|
<?php
|
2017-03-25 07:41:17 -05:00
|
|
|
declare(strict_types=1);
|
2016-06-17 07:06:38 -05:00
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Class CreateUsersTable
|
|
|
|
*/
|
|
|
|
class CreateUsersTable extends Migration
|
|
|
|
{
|
2017-03-25 07:41:17 -05:00
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::drop('users');
|
|
|
|
}
|
|
|
|
|
2016-06-17 07:06:38 -05:00
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
2016-12-24 07:43:42 -06:00
|
|
|
* @SuppressWarnings(PHPMD.ShortMethodName)
|
2016-06-17 07:06:38 -05:00
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
if (!Schema::hasTable('users')) {
|
|
|
|
Schema::create(
|
2017-11-15 03:53:17 -06:00
|
|
|
'users',
|
|
|
|
function (Blueprint $table) {
|
|
|
|
$table->increments('id');
|
|
|
|
$table->timestamps();
|
|
|
|
$table->string('email', 255);
|
|
|
|
$table->string('password', 60);
|
|
|
|
$table->string('remember_token', 100)->nullable();
|
|
|
|
$table->string('reset', 32)->nullable();
|
|
|
|
$table->tinyInteger('blocked', false, true)->default('0');
|
|
|
|
$table->string('blocked_code', 25)->nullable();
|
|
|
|
}
|
2016-06-17 07:06:38 -05:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|