protected function findPrimaryKeyIndex($indexes, $table)
{
/*
* This method ignores auto-increment primary keys
* as they are managed with the increments() method
* instead of the primary().
*/
foreach ($indexes as $index) {
if (!$index->isPrimary()) {
continue;
}
if ($this->indexHasAutoincrementColumns($index, $table)) {
continue;
}
return $index;
}
return null;
}