mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Changes default MySQL storage engine to InnoDB. File requires MyISAM for FulltextSearch.
This commit is contained in:
parent
6bf3f7ded4
commit
ca074eb7ba
@ -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()}.
|
||||
*
|
||||
|
@ -3111,7 +3111,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
||||
* @var array
|
||||
*/
|
||||
static $create_table_options = array(
|
||||
'MySQLDatabase' => 'ENGINE=MyISAM'
|
||||
'MySQLDatabase' => 'ENGINE=InnoDB'
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -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');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user