Use morphed column types

This commit is contained in:
Nabeel Shahzad
2018-03-01 09:51:48 -06:00
parent d22eed50ad
commit f1b9ea94dc

View File

@@ -18,8 +18,7 @@ class CreateJournalsTable extends Migration
$table->unsignedInteger('ledger_id')->nullable();
$table->bigInteger('balance')->default(0);
$table->string('currency', 5);
$table->string('morphed_type', 32)->nullable();
$table->unsignedInteger('morphed_id')->nullable();
$table->nullableMorphs('morphed');
$table->timestamps();
});
}