Fixes and tests for the journal and journaled transactions #130

This commit is contained in:
Nabeel Shahzad
2018-02-28 21:52:36 -06:00
parent 1794549a20
commit 498e795e4b
9 changed files with 213 additions and 33 deletions

View File

@@ -17,8 +17,8 @@ class CreateJournalTransactionsTable extends Migration
$table->char('id', 36)->unique();
$table->char('transaction_group', 36)->nullable();
$table->integer('journal_id');
$table->unsignedBigInteger('debit')->nullable();
$table->unsignedBigInteger('credit')->nullable();
$table->unsignedBigInteger('debit')->nullable();
$table->char('currency', 5);
$table->text('memo')->nullable();
$table->char('ref_class', 32)->nullable();

View File

@@ -17,9 +17,9 @@ class CreateJournalsTable extends Migration
$table->increments('id');
$table->unsignedInteger('ledger_id')->nullable();
$table->bigInteger('balance')->default(0);
$table->char('currency', 5);
$table->char('morphed_type', 32);
$table->integer('morphed_id');
$table->string('currency', 5);
$table->string('morphed_type', 32)->nullable();
$table->unsignedInteger('morphed_id')->nullable();
$table->timestamps();
});
}