<?php

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

class User extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user', function (Blueprint $table) {
            $table->integerIncrements('u_id');

            $table->string('u_email', 128)->unique();
            $table->string('u_nama', 64);
            $table->string('u_role', 16);
            $table->string('u_no_hp', 12);
            $table->string('u_password');

            $table->timestamp('u_created_at')->useCurrent();
            $table->timestamp('u_updated_at')->nullable();
            $table->timestamp('u_deleted_at')->nullable();
        });
    }

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