function columnType($fieldname, $source)
    {
        $column = self::describeColumn($fieldname, $source);
        if ( ! $column ) throw new \Exception("Could not find $fieldname");
        $type = U::get($column, "Type");
        if ( ! $type ) return null;
        if ( strpos($type, '(') === false ) return $type;
        $matches = array();
        preg_match('/([a-z]+)\([0-9]+\)/', $type, $matches);
        if ( count($matches) == 2 ) return $matches[1];
        return null;
    }