[PATCH] migrate the database schema to SQLAlchemy