Open kidzen opened 7 years ago
!empty($fk) will skip parent table that does not have any parent to have children to be excluded from generate this expanded column.
$this->createTable('{{%parent}}', [
'id' => $this->primaryKey(),
'name' => $this->string(),
]);
$this->createTable('{{%child}}', [
'id' => $this->primaryKey(),
'parent_id' => $this->integer(),
'name' => $this->string(),
]);
$this->addForeignKey('fk1','{{child}}','parent_id','{{parent}}','id');
use this, and see parent/index..it will not be expanded...instead, use
sizeof($tableSchema->primaryKey) < 2
should only exclude junction table from expandable