Porting to Peewee ORM for simplicity