Field class no more supports add_to_class(class, name) method
You can use `Model._meta.add_field(field_name, field)`. > You can use `Model._meta.add_field(field_name, field)`.

Not able to add field in database using this. How can I do it?? > Not able to add field in database using this. How can I do it??

Probably you need to use a schema migration? http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#schema-migrations Is any way to get only fields of class ??
Ex - 
class Test1(BaseModel):
    name = CharField(default = 'Test')
    new_column = peewee.IntegerField(default = 0)
    new_column1 = IntegerField(default = 0)
    new_column2 = IntegerField(default = 0)
    new_column3 = IntegerField(default = 0)
    new_column4 = IntegerField(default = 0)

output expected - 
['name', 'new_column', 'new_column1', 'new_column2', 'new_column3', 'new_column4 ']
--


 > > Not able to add field in database using this. How can I do it??
> 
> Probably you need to use a schema migration? http://docs.peewee-orm.com/en/latest/peewee/playhouse.html#schema-migrations

Thanks coleifer, It worked... @jayashreesathe http://lmgtfy.com/?q=Get+fields+on+model+Peewee+python

In peewee 2.x it was possible to dynamically define fileds in model using this method, like it's described here:
https://stackoverflow.com/questions/22358489/dynamically-define-fields-in-a-peewee-model
However, in 3.x this method doesn't work. Is there some alternative?