Viewing File: /home/ubuntu/efidemo/database/migrations/2014_10_12_000000_create_users_table.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->string('unique_id')->default(rand());
            $table->string('name');
            $table->string('first_name')->default('');
            $table->string('middle_name')->default('');
            $table->string('last_name')->default('');
            $table->string('username')->default('');
            $table->string('mobile')->nullable();
            $table->string('email')->unique();
            $table->string('password');
            $table->enum('gender',['male','female','others','rather-not-select'])->default('rather-not-select');
            $table->string('cover')->default(asset('cover.jpg'));
            $table->string('picture')->default(asset('placeholder.jpeg'));
            $table->date('dob')->nullable();
            $table->string('address')->nullable();
            $table->string('state')->nullable();
            $table->string('country')->nullable();
            $table->string('country_code')->nullable();
            $table->string('website')->nullable();
            $table->text('about')->nullable();
            $table->string('token');
            $table->string('token_expiry');
            $table->string('device_token')->nullable();
            $table->enum('device_type', ['web', 'android', 'ios'])->default('web');
            $table->enum('login_by', ['manual','facebook','google'])->default('manual');
            $table->string('social_unique_id')->default('');
            $table->tinyInteger('is_email_verified')->default(USER_EMAIL_NOT_VERIFIED);
            $table->tinyInteger('is_two_step_auth_enabled')->default(NO);
            $table->string('verification_code')->default('');
            $table->string('verification_code_expiry')->default('');
            $table->timestamp('email_verified_at')->nullable();
            $table->tinyInteger('email_notification')->default(YES);
            $table->tinyInteger('push_notification')->default(YES);
            $table->tinyInteger('status')->default(USER_APPROVED);
            $table->tinyInteger('kyc_status')->default(DOCUMENT_VERIFICATION_PENDING);
            $table->string('timezone')->default("");
            $table->tinyInteger('is_logged_in')->default(YES);
            $table->rememberToken();
            $table->longText('wallet_address')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users');
    }
}
Back to Directory File Manager