44 lines
1.1 KiB
PHP
44 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class Admin extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('admin', function (Blueprint $table) {
|
|
$table->increments('admin_id');
|
|
$table->uuid('admin_uuid')->unique();
|
|
$table->string('username', 32);
|
|
$table->text('password');
|
|
$table->string('firstname',32);
|
|
$table->string('lastname',32);
|
|
$table->string('email',32);
|
|
$table->tinyInteger('role');
|
|
$table->tinyInteger('is_passwordChanged')->default(0);
|
|
$table->tinyInteger('status')->default(0);
|
|
$table->timestamps();
|
|
$table->integer('created_by')->default(0);
|
|
$table->integer('updated_by')->default(0);
|
|
$table->boolean('is_active')->default(1);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('admin');
|
|
}
|
|
}
|