1
0
mirror of synced 2024-12-13 14:56:01 +03:00

The index lookup needs to allow for array("fields" => "name") where the fields list

is a string and not an array
This commit is contained in:
njero 2007-08-01 14:50:46 +00:00
parent bc6ff6903d
commit cb146fb8e8

View File

@ -104,7 +104,10 @@ class Doctrine_Export_Mysql extends Doctrine_Export
$found = false;
if (isset($options['indexes'])) {
foreach ($options['indexes'] as $definition) {
if (in_array($local, $definition['fields']) && count($definition['fields']) === 1) {
if (is_string($definition['fields'])) {
// Check if index already exists on the column
$found = ($local == $definition['fields']);
} else if (in_array($local, $definition['fields']) && count($definition['fields']) === 1) {
// Index already exists on the column
$found = true;
}