50 lines
1.6 KiB
PHP
50 lines
1.6 KiB
PHP
<?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->unsignedInteger('parent_id')->default(0);
|
|
$table->unsignedInteger('department_id')->default(0);
|
|
$table->string('first_name', 191);
|
|
$table->string('last_name', 255);
|
|
$table->string('email', 191)->unique();
|
|
$table->string('username', 255);
|
|
$table->timestamp('email_verified_at')->nullable();
|
|
$table->string('password', 191)->nullable();
|
|
$table->string('cell_phone_number', 50)->nullable();
|
|
$table->string('profile_picture', 255)->nullable();
|
|
$table->text('home_address', 255)->nullable();
|
|
$table->rememberToken();
|
|
$table->timestamps();
|
|
$table->unsignedTinyInteger('status')->default(1);
|
|
$table->unsignedTinyInteger('working_status')->default(1);
|
|
$table->unsignedTinyInteger('is_log_in')->default(0);
|
|
$table->string('user_language', 50)->default('en');
|
|
$table->unsignedInteger('user_disk_quota')->default(500);
|
|
$table->unsignedInteger('user_disk_uses')->default(0);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('users');
|
|
}
|
|
}
|