unioil-loyalty-app/database/migrations/2018_09_20_054157_top_up.php

40 lines
975 B
PHP
Executable File

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class TopUp extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('top_up', function (Blueprint $table) {
$table->increments('topup_id');
$table->uuid('topup_uuid')->unique();
$table->string('fee_code',12);
$table->string('name', 32);
$table->double('amount',8,2);
$table->timestamps();
$table->integer('created_by')->default(0);
$table->integer('updated_by')->default(0);
$table->boolean('is_active')->default(1);
$table->tinyInteger('type')->default(1);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('top_up');
}
}