mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: niced the way MultiEnums call requireField to give alternative adapter access (from r98043)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102570 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
a2055d1d67
commit
529ed1dd1d
@ -31,8 +31,10 @@ class MultiEnum extends Enum {
|
||||
}
|
||||
|
||||
function requireField(){
|
||||
$defaultClause = $this->default ? " default '". Convert::raw2sql($this->default) . "'" : "";
|
||||
DB::requireField($this->tableName, $this->name, "set('" . implode("','", $this->enum) . "') character set utf8 collate utf8_general_ci$defaultClause");
|
||||
|
||||
$values=array('type'=>'set', 'parts'=>array('enums'=>$this->enum, 'character set'=>'utf8', 'collate'=> 'utf8_general_ci', 'default'=>Convert::raw2sql($this->default), 'table'=>$this->tableName, 'arrayValue'=>$this->arrayValue));
|
||||
DB::requireField($this->tableName, $this->name, $values);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user