I define a lot of model classes using peewee. ClassName.create_table() can generate the table,but only one table. How could I create all tables using a single state
ClassName.create_table()
for cls in globals().values(): if type(cls) == peewee.BaseModel: try: cls.create_table() except peewee.OperationalError as e: print(e)