Skip to content

Commit 08c1d7c

Browse files
committed
Merge branch 'dev'
2 parents 6e88d7a + 1b24254 commit 08c1d7c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Blueprint/BlueprintDiff.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ public function applyColumnIndexes(bool $reverse = false)
4242
}
4343

4444
foreach ($this->getAddedIndexes($reverse) as $index) {
45-
$blueprint->{$index->name}($index->columns, $index->index, $index->algorithm);
45+
$addedIndex = $blueprint->{$index->name}($index->columns, $index->index, $index->algorithm);
46+
47+
foreach (array_keys($index->getAttributes()) as $attribute) {
48+
$addedIndex->{$attribute} = $index->{$attribute};
49+
}
4650
}
4751

4852
foreach ($this->getRenamedIndexes($reverse) as $from => $to) {
@@ -191,7 +195,7 @@ public function extractForeignKey(string $on, string $reference): Fluent
191195
if (
192196
IndexType::Foreign->value !== $index->name ||
193197
$index->on !== $on ||
194-
!in_array($reference, $index->references)
198+
!in_array($reference, $references)
195199
) {
196200
continue;
197201
}

0 commit comments

Comments
 (0)