Skip to content

Commit 0b373f6

Browse files
authored
Merge pull request #11900 from xabbuh/dbal-6886
replace Index::overrules() with custom checks
2 parents 4baa7bd + 36b9064 commit 0b373f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/Tools/SchemaTool.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ public function getSchemaFromMetadata(array $classes): Schema
319319
$primaryKey = $table->getIndex('primary');
320320

321321
foreach ($table->getIndexes() as $idxKey => $existingIndex) {
322-
if ($primaryKey->overrules($existingIndex)) {
322+
if (! $existingIndex->isPrimary() && $primaryKey->spansColumns($existingIndex->getColumns())) {
323323
$table->dropIndex($idxKey);
324324
}
325325
}

0 commit comments

Comments
 (0)