

@classmethod
def sqlall(cls):
    queries = []
    compiler = cls._meta.database.compiler()
    pk = cls._meta.primary_key
    if (cls._meta.database.sequences and fields.sequence):
        queries.append(compiler.create_sequence(pk.sequence))
    queries.append(compiler.create_table(cls))
    for field in cls._fields_to_index():
        queries.append(compiler.create_index(cls, [field], field.unique))
    if cls._meta.indexes:
        for (field_names, unique) in cls._meta.indexes:
            fields = [cls._meta.fields[f] for f in field_names]
            queries.append(compiler.create_index(cls, fields, unique))
    return [sql for (sql, _) in queries]

dataset/ETHPy150Open coleifer/peewee/peewee.py Model.sqlall/VarMisuse@48/54 `pk`->`fields`