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.

20 line
555B

  1. <?php foreach ($foreignKeys as $column => $fkData): ?>
  2. // creates index for column `<?= $column ?>`
  3. $this->createIndex(
  4. '<?= $fkData['idx'] ?>',
  5. '<?= $table ?>',
  6. '<?= $column ?>'
  7. );
  8. // add foreign key for table `<?= $fkData['relatedTable'] ?>`
  9. $this->addForeignKey(
  10. '<?= $fkData['fk'] ?>',
  11. '<?= $table ?>',
  12. '<?= $column ?>',
  13. '<?= $fkData['relatedTable'] ?>',
  14. 'id',
  15. 'CASCADE'
  16. );
  17. <?php endforeach;