throw new \
RuntimeException( 'Tables with multi column primary keys not supported. Maybe this migration did already run.'
);
} $pkName =
current($pk->
getColumns());
return sprintf(self::MODIFY_PRIMARY_KEY_IN_MAIN,
$tableName,
$newColumnName,
$defaultValue,
$pkName,
$pkName,
$newColumnName);
} private function findForeignKeyDefinition(array
$keyStructure): ForeignKeyConstraint
{ $fks =
$this->schemaManager->
listTableForeignKeys($keyStructure['TABLE_NAME'
]);
$fk = null;
foreach ($fks as $fk) { if ($this->
isEqualForeignKey($fk,
$keyStructure['REFERENCED_TABLE_NAME'
],
$keyStructure['REFERENCED_COLUMN_NAME'
])) { break;
} } if ($fk === null
) { throw new \
LogicException('Unable to find a foreign key that was previously selected'
);
}