mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Only set the create_table_options value when enabling FulltextSearch
This commit is contained in:
parent
dc9b500156
commit
82da8a0718
@ -97,10 +97,6 @@ class File extends DataObject {
|
||||
"Hierarchy",
|
||||
);
|
||||
|
||||
static $create_table_options = array(
|
||||
'MySQLDatabase' => 'ENGINE=MyISAM'
|
||||
);
|
||||
|
||||
/**
|
||||
* @var array List of allowed file extensions, enforced through {@link validate()}.
|
||||
*
|
||||
|
@ -50,6 +50,7 @@ class FulltextSearchable extends DataExtension {
|
||||
|
||||
if(isset($defaultColumns[$class])) {
|
||||
Object::add_extension($class, "FulltextSearchable('{$defaultColumns[$class]}')");
|
||||
Object::add_static_var($class, 'create_table_options', array('MySQLDatabase' => 'ENGINE=MyISAM'));
|
||||
} else {
|
||||
throw new Exception("FulltextSearchable::enable() I don't know the default search columns for class '$class'");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user