protected function normalizeProperties($properties)
	{
		foreach ($properties as $property => $type)
		{
			if (preg_match('/(.*?)\(\d+\).*/i', $type, $matches))
			{
				$type = $matches[1];

				$properties[$property] = $type;
			}

			switch ($type)
			{
				case 'text':
				case 'tinytext':
				case 'mediumtext':
				case 'longtext':
				case 'blob':
					$properties[$property] = 'text';
				break;

				case 'int':
				case 'integer':
				case 'smallint':
				case 'tinyint':
				case 'bigint':
				case 'mediumint':
				case 'year':
					$properties[$property] = 'integer';
				break;

				case 'datetime':
				case 'date':
				case 'timestamp':
				case 'time':
					$properties[$property] = 'date';
				break;

				case 'varchar':
				case 'char':
				default:
					$properties[$property] = 'string';
				break;
			}
		}

		return $properties;
	}
protected function normalizeProperties($properties)
	{
		foreach ($properties as $property => $type)
		{
			if (preg_match('/(.*?)\(\d+\).*/i', $type, $matches))
			{
				$type = $matches[1];

				$properties[$property] = $type;
			}

			switch ($type)
			{
				case 'text':
				case 'tinytext':
				case 'mediumtext':
				case 'longtext':
				case 'blob':
					$properties[$property] = 'text';
				break;

				case 'int':
				case 'integer':
				case 'smallint':
				case 'tinyint':
				case 'bigint':
				case 'mediumint':
				case 'year':
					$properties[$property] = 'integer';
				break;

				case 'datetime':
				case 'date':
				case 'timestamp':
				case 'time':
					$properties[$property] = 'date';
				break;

				case 'varchar':
				case 'char':
				default:
					$properties[$property] = 'string';
				break;
			}
		}

		return $properties;
	}
protected function normalizeProperties ( $ properties ) { foreach ( $ properties as $ property => $ type ) { if ( preg_match ( '/(.*?)\(\d+\).*/i' , $ type , $ matches ) ) { $ type = $ matches [ 1 ] ; $ properties [ $ property ] = $ type ; } switch ( $ type ) { case 'text' : case 'tinytext' : case 'mediumtext' : case 'longtext' : case 'blob' : $ properties [ $ property ] = 'text' ; break ; case 'int' : case 'integer' : case 'smallint' : case 'tinyint' : case 'bigint' : case 'mediumint' : case 'year' : $ properties [ $ property ] = 'integer' ; break ; case 'datetime' : case 'date' : case 'timestamp' : case 'time' : $ properties [ $ property ] = 'date' ; break ; case 'varchar' : case 'char' : default : $ properties [ $ property ] = 'string' ; break ; } } return $ properties ; }
Reduce field types to a couple generic types

@param   array  $properties
@return  array
Reduce field types to a couple generic types