• File: 2020_05_25_122740_create_admins_table.php
  • Full Path: /home/masbinta/public_html/core/database/migrations/2020_05_25_122740_create_admins_table.php
  • File size: 1.06 KB
  • MIME-type: text/x-php
  • Charset: utf-8
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAdminsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('admins', function (Blueprint $table) {
            $table->id();
            $table->tinyInteger('status')->default(1)->comment('0 - deactive, 1 - active');
            $table->integer('role_id')->nullable();
            $table->string('name')->nullable();
            $table->string('username')->nullable();
            $table->string('email')->nullable();
            $table->integer('email_verified')->default(0);
            $table->string('image')->nullable();
            $table->string('password')->nullable();
            $table->string('remember_token')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('admins');
    }
}