'Returns the CREATE INDEX SQL statements for a single model'

def sql_indexes_for_model(self, model, style):

    if ((not model._meta.managed) or model._meta.proxy):
        return []
    output = []
    for f in model._meta.local_fields:
        output.extend(self.sql_indexes_for_field(model, f, style))
    return output
