Skip to content

Commit c1e13ed

Browse files
committed
Fix Migration::indexExists
1 parent 5aab15b commit c1e13ed

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/PHPFUI/ORM/Migration.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,15 @@ protected function indexExists(string $table, string $indexName) : bool
479479
{
480480
$indexes = \PHPFUI\ORM::getIndexes($table);
481481

482-
return isset($indexes[$indexName]);
482+
foreach ($indexes as $index)
483+
{
484+
if ($index->keyName === $indexName)
485+
{
486+
return true;
487+
}
488+
}
489+
490+
return false;
483491
}
484492

485493
/**

0 commit comments

Comments
 (0)