for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Author: Emmanuel Paul Mnzava
* Twitter: @epmnzava
* Github:https://github.com/dbrax/income-expense
* Email: [email protected]
*
*/
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateLedgerTable extends Migration
{
* Run the migrations.
* @return void
public function up()
Schema::create('ledger', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('transaction_id');
$table->string('transaction_type'); // exp or inc
$table->string('transaction_type_category');
$table->integer('amount');
$table->integer('walking_balance')->default(); // always gets deducted when expense is added optinal
$table->timestamps();
});
}
* Reverse the migrations.
public function down()
Schema::dropIfExists('ledger');