Files
Global-Jain/database/migrations/2014_10_12_000000_create_users_table.php
2025-11-05 10:37:10 +05:30

53 lines
1.8 KiB
PHP

<?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->uuid('uuid');
$table->string('name');
$table->string('email')->unique()->nullable();
$table->string('email_hash')->unique()->nullable();
$table->string('password')->nullable()->comment('encrypted');
$table->string('username')->unique();
$table->string('country_code')->nullable();
$table->string('mobile')->unique()->nullable();
$table->integer('dharma_id')->nullable();
$table->date('birth_date')->nullable();
$table->tinyInteger('gender')->nullable()->comment('1: Male, 2: Female, 3: Custom');
$table->timestamp('email_verified_at')->nullable();
$table->timestamp('mobile_verified_at')->nullable();
$table->string('avatar', 35)->nullable();
$table->unsignedTinyInteger('verification_confirmed')->default(1)->comment('1 : Not confirmed, 2 : Confirmed');
$table->unsignedTinyInteger('status')->default(1)->comment('1 : Not Active 2 : Active');
$table->string('timezone')->nullable();
$table->datetime('last_login_at')->nullable();
$table->string('last_login_ip')->nullable();
$table->rememberToken();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}