You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
584 B
19 lines
584 B
<?php foreach ($foreignKeys as $column => $fkData): ?> |
|
|
|
// creates index for column `<?= $column ?>` |
|
$this->createIndex( |
|
'<?= $fkData['idx'] ?>', |
|
'<?= $table ?>', |
|
'<?= $column ?>' |
|
); |
|
|
|
// add foreign key for table `<?= $fkData['relatedTable'] ?>` |
|
$this->addForeignKey( |
|
'<?= $fkData['fk'] ?>', |
|
'<?= $table ?>', |
|
'<?= $column ?>', |
|
'<?= $fkData['relatedTable'] ?>', |
|
'<?= $fkData['relatedColumn'] ?>', |
|
'CASCADE' |
|
); |
|
<?php endforeach;
|
|
|