Changes default MySQL storage engine to InnoDB. File requires MyISAM for FulltextSearch.

This commit is contained in:
Simon Welsh 2011-10-29 13:34:45 +13:00
parent 6bf3f7ded4
commit ca074eb7ba
3 changed files with 8 additions and 4 deletions

View File

@ -97,6 +97,10 @@ class File extends DataObject {
"Hierarchy",
);
static $create_table_options = array(
'MySQLDatabase' => 'ENGINE=MyISAM'
);
/**
* @var array List of allowed file extensions, enforced through {@link validate()}.
*

View File

@ -3111,7 +3111,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
* @var array
*/
static $create_table_options = array(
'MySQLDatabase' => 'ENGINE=MyISAM'
'MySQLDatabase' => 'ENGINE=InnoDB'
);
/**

View File

@ -29,7 +29,7 @@ class TransactionTest extends SapphireTest {
$obj->write();
$obj=new TransactionTest_Object();
$obj->Title='Forth page';
$obj->Title='Fourth page';
$obj->write();
//Revert to a savepoint:
@ -40,7 +40,7 @@ class TransactionTest extends SapphireTest {
$first=DataObject::get('TransactionTest_Object', "\"Title\"='First page'");
$second=DataObject::get('TransactionTest_Object', "\"Title\"='Second page'");
$third=DataObject::get('TransactionTest_Object', "\"Title\"='Third page'");
$forth=DataObject::get('TransactionTest_Object', "\"Title\"='Forth page'");
$fourth=DataObject::get('TransactionTest_Object', "\"Title\"='Fourth page'");
//These pages should be in the system
$this->assertTrue(is_object($first) && $first->exists());
@ -48,7 +48,7 @@ class TransactionTest extends SapphireTest {
//These pages should NOT exist, we reverted to a savepoint:
$this->assertFalse(is_object($third) && $third->exists());
$this->assertFalse(is_object($forth) && $forth->exists());
$this->assertFalse(is_object($fourth) && $fourth->exists());
} else {
$this->markTestSkipped('Current database does not support transactions');
}