public static function simplifyTypeName($typeName)
{
switch ($typeName) {
case "integer":
case "float":
case "smallint":
case "bigint":
case "decimal":
case "numeric":
case "smallint":
case "bigint":
return self::TYPE_NUMBER;
case "string":
case "text":
return self::TYPE_STRING;
case "datetime":
return self::TYPE_DATETIME;
case "date":
return self::TYPE_DATE;
default:
throw new \Exception("Unknown type {$typeName}");
}
}