Changed foreign key id field name in person_targets and account_classes from
'io_type' to 'io_type_id'. Implemented PersonTarget factory.
This commit is contained in:
@@ -31,8 +31,8 @@ class CreatePersonTargetsTable extends Migration
|
||||
// The type of the target. It can be either a payable or a
|
||||
// receivable. A payable is of type 'expediture' and a receivable is
|
||||
// of type 'income'.
|
||||
$table->integer('io_type')->unsigned();
|
||||
$table->foreign('io_type')->references('id')->on('i_o_types')
|
||||
$table->integer('io_type_id')->unsigned();
|
||||
$table->foreign('io_type_id')->references('id')->on('i_o_types')
|
||||
->onDelete('no action');
|
||||
|
||||
// A reference text which describes the target
|
||||
|
||||
@@ -23,8 +23,8 @@ class CreateAccountClassesTable extends Migration
|
||||
$table->smallInteger('number')->unsigned()->unique();
|
||||
|
||||
// The type of the account class.
|
||||
$table->integer('io_type')->unsigned();
|
||||
$table->foreign('io_type')->references('id')->on('i_o_types')
|
||||
$table->integer('io_type_id')->unsigned();
|
||||
$table->foreign('io_type_id')->references('id')->on('i_o_types')
|
||||
->onDelete('no action');
|
||||
|
||||
// The scope of the account class.
|
||||
|
||||
Reference in New Issue
Block a user