CasperSecurity
<?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');
$table->string('user_id')->nullable();
$table->string('username')->unique();
$table->string('designation')->nullable();
$table->string('email')->nullable()->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->foreignId('organisation_unit_id')->nullable();
$table->dateTime('last_login')->nullable();
$table->foreignId('role_id')->nullable();
$table->string('role_name')->nullable();
$table->foreignId('manager_id')->nullable();
$table->string('manager_name')->nullable();
$table->foreignId('team_id')->nullable();
$table->string('team_name')->nullable();
$table->date('date_of_birth')->nullable();
$table->string('qualification')->nullable();
$table->string('location')->nullable();
$table->date('date_of_joining')->nullable();
$table->string('employment_status')->nullable();
$table->integer('password_change_count')->nullable();
$table->tinyInteger('status')->default('1');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}