'Return the database field type for the given geometry field.
Typically this is `None` because geometry columns are added via
the `AddGeometryColumn` stored procedure, unless the field
has been specified to be of geography type instead.'

def geo_db_type(self, f):

    if f.geography:
        if (not self.geography):
            raise NotImplementedError('PostGIS    1.5    required    for    geography    column    support.')
        if (f.srid != 4326):
            raise NotImplementedError('PostGIS    1.5    supports    geography    columns    only    with    an    SRID    of    4326.')
        return ('geography(%s,%d)' % (f.geom_type, f.srid))
    else:
        return None
