def get_field_type(f):
    raw_type = f.db_type(connection)
    if raw_type.lower().split()[0] in ('serial', 'integer', 'unsigned', 'bigint', 'smallint'):
        raw_type = 'integer'
    return raw_type
dataset/ETHPy150Open coleifer/django-generic-aggregation/generic_aggregation/utils.py/get_field_type/original