Skip to content

Commit 685e46a

Browse files
committed
fix: pass join column options to FK
1 parent 9d4f54b commit 685e46a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Tools/SchemaTool.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
use function array_filter;
3232
use function array_flip;
3333
use function array_intersect_key;
34+
use function array_merge;
3435
use function assert;
3536
use function count;
3637
use function current;
@@ -712,6 +713,10 @@ private function gatherRelationJoinColumns(
712713
$uniqueConstraints[] = ['columns' => [$quotedColumnName]];
713714
}
714715

716+
if ($joinColumn->options) {
717+
$fkOptions = array_merge($fkOptions, $joinColumn->options);
718+
}
719+
715720
if (isset($joinColumn->onDelete)) {
716721
$fkOptions['onDelete'] = $joinColumn->onDelete;
717722
}

0 commit comments

Comments
 (0)