lundi 4 mai 2015

How do you tell peewee what order to put field when create tables

In a situation where you have an inhierted Models in peewee, how do you tell peewee what order to create the fields in the tables. In the following example, I the order is b, c, a where I want the fields in a, b, c order.

class BaseModel(Model):
  b = CharField()
  c = CharField()

class Table(BaseModel):
  a = CharField()

database.create_table(Table)

Aucun commentaire:

Enregistrer un commentaire