unioil-mobile-api/database/migrations/2018_09_20_025102_personal_...

42 lines
1.1 KiB
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class PersonalDetails extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('personal_details', function (Blueprint $table) {
$table->increments('pd_id');
$table->uuid('pd_uuid')->unique();
$table->string('firstname', 32);
$table->string('middlename', 32);
$table->string('lastname', 32);
$table->string('photo', 128);
$table->datetime('birthdate');
$table->text('address');
$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('personal_details');
}
}