

@classmethod
def _create_indexes(cls):
    db = cls._meta.database
    for field in cls._fields_to_index():
        db.create_index(cls, [field], field.unique)
    if cls._meta.indexes:
        for (fields, unique) in cls._meta.indexes:
            db.create_index(db, fields, unique)

dataset/ETHPy150Open coleifer/peewee/peewee.py Model._create_indexes/VarMisuse@76/90 `cls`->`db`