BUGFIX: Fixed engine selection option default, so that it works on windows.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77569 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-05-21 08:42:18 +00:00
parent 3e205b632f
commit 86c7c2a3bd

View File

@ -202,7 +202,8 @@ class MySQLDatabase extends Database {
*/
public function createTable($table, $fields = null, $indexes = null, $options = null) {
$fieldSchemas = $indexSchemas = "";
$addOptions = (isset($options[$this->class])) ? $options[$this->class] : null;
$addOptions = empty($options[$this->class]) ? "ENGINE=MyISAM" : $options[$this->class];
if(!isset($fields['ID'])) $fields['ID'] = "int(11) not null auto_increment";
if($fields) foreach($fields as $k => $v) $fieldSchemas .= "\"$k\" $v,\n";