mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
SVN:trunk[3668]
This commit is contained in:
@@ -2656,6 +2656,22 @@ class AttributeEnum extends AttributeString
|
||||
return "VARCHAR(255)".($bFullSpec ? " DEFAULT ''" : ""); // ENUM() is not an allowed syntax!
|
||||
}
|
||||
}
|
||||
|
||||
protected function GetSQLColSpec()
|
||||
{
|
||||
$default = $this->ScalarToSQL($this->GetDefaultValue());
|
||||
if (is_null($default))
|
||||
{
|
||||
$sRet = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
// ENUMs values are strings so the default value must be a string as well,
|
||||
// otherwise MySQL interprets the number as the zero-based index of the value in the list (i.e. the nth value in the list)
|
||||
$sRet = " DEFAULT ".CMDBSource::Quote($default);
|
||||
}
|
||||
return $sRet;
|
||||
}
|
||||
|
||||
public function ScalarToSQL($value)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user