Viewing File: /home/ubuntu/btcthrottle-backend/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')->unique();
            $table->string('name');
            $table->string('email')->unique();
            $table->string('password');
            $table->string('mobile')->nullable();
            $table->string('country_code')->nullable();
            $table->string('cover')->default(asset('placeholders/cover.jpg'));
            $table->string('picture')->default(asset('placeholders/placeholder.jpg'));
            $table->string('about')->nullable();
            $table->enum('gender', [MALE, FEMALE, OTHERS, RATHER_NOT_SELECT])->default(RATHER_NOT_SELECT);
            $table->string('verification_code')->default('');
            $table->string('verification_code_expiry')->default('');
            $table->tinyInteger('email_status')->default(USER_EMAIL_NOT_VERIFIED);
            $table->timestamp('email_verified_at')->nullable();
            $table->tinyInteger('kyc_status')->default(KYC_PENDING);
            $table->timestamp('kyc_verified_at')->nullable();
            $table->string('timezone')->default(DEFAULT_TIMEZONE);
            $table->tinyInteger('status')->default(USER_APPROVED);
            $table->timestamp('last_password_reset_at')->nullable();
            $table->timestamps();
        });
    }

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