pip install pony
python
from pony import orm
db = orm.Database()
db.bind(provider='your_provider', user='your_user', password='your_password', host='your_host', database='your_database')
python
class User(db.Entity):
id = orm.PrimaryKey(int, auto=True)
name = orm.Required(str)
email = orm.Required(str, unique=True)
pony db migrate --name your_migration_name
python
def upgrade(db):
with db.schema:
db.alter_table(User)
db.add_column(User, 'age', orm.Required(int))
pony db upgrade