1
0
mirror of synced 2024-12-13 06:46:03 +03:00

Fixed #680: Missing quotation of ENUM DEFAULT Statement

This commit is contained in:
Mosh 2007-12-18 19:40:18 +00:00
parent f3e9fe66a8
commit 9de41c83d1

View File

@ -518,7 +518,15 @@ class Doctrine_Export_Mysql extends Doctrine_Export
}
}
$default = ' DEFAULT ' . $this->conn->quote($field['default'], $field['type']);
// Proposed patch:
if ($field['type'] == 'enum' && $this->conn->getAttribute(Doctrine::ATTR_USE_NATIVE_ENUM)) {
$fieldType = 'varchar';
} else {
$fieldType = $field['type'];
}
$default = ' DEFAULT ' . $this->conn->quote($field['default'], $fieldType);
//$default = ' DEFAULT ' . $this->conn->quote($field['default'], $field['type']);
}
return $default;
}