def json_schema_to_postgres_type(schema: dict) ->str:
    """
    Maps a JSON schema to a Postgres type for on the fly mapping.
    :param schema: JSON schema to map.
    """
    if schema['type'] == 'string':
        return 'TEXT'
    elif schema['type'] == 'integer':
        return 'INTEGER'
    elif schema['type'] == 'number':
        return 'DOUBLE PRECISION'
    elif schema['type'] == 'object':
        return 'JSON'
    elif schema['type'] == 'array':
        return 'JSON'
    elif schema['type'] == 'boolean':
        return 'BOOLEAN'
    else:
        return 'TEXT'
