2016-06-17 07:06:38 -05:00
|
|
|
<?php
|
2016-09-17 00:57:32 -05:00
|
|
|
/**
|
|
|
|
* 2016_06_16_000001_create_users_table.php
|
|
|
|
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
|
|
*
|
2016-10-04 23:52:15 -05:00
|
|
|
* This software may be modified and distributed under the terms of the
|
|
|
|
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
|
|
*
|
|
|
|
* See the LICENSE file for details.
|
2016-09-17 00:57:32 -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
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* 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(
|
|
|
|
'users', function (Blueprint $table) {
|
|
|
|
$table->increments('id');
|
|
|
|
$table->timestamps();
|
|
|
|
$table->string('email', 255);
|
|
|
|
$table->string('password', 60);
|
2016-09-20 02:32:58 -05:00
|
|
|
$table->string('remember_token', 100)->nullable();
|
2016-09-16 00:16:09 -05:00
|
|
|
$table->string('reset', 32)->nullable();
|
2016-06-17 07:06:38 -05:00
|
|
|
$table->tinyInteger('blocked', false, true)->default('0');
|
|
|
|
$table->string('blocked_code', 25)->nullable();
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::drop('users');
|
|
|
|
}
|
|
|
|
}
|