Use morphed column types
This commit is contained in:
@@ -18,8 +18,7 @@ class CreateJournalsTable extends Migration
|
|||||||
$table->unsignedInteger('ledger_id')->nullable();
|
$table->unsignedInteger('ledger_id')->nullable();
|
||||||
$table->bigInteger('balance')->default(0);
|
$table->bigInteger('balance')->default(0);
|
||||||
$table->string('currency', 5);
|
$table->string('currency', 5);
|
||||||
$table->string('morphed_type', 32)->nullable();
|
$table->nullableMorphs('morphed');
|
||||||
$table->unsignedInteger('morphed_id')->nullable();
|
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user