Skip to content

Commit 36b9064

Browse files
committed
replace Index::overrules() with custom checks
1 parent 4baa7bd commit 36b9064

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)