WIP alerts: port to Flask/SQLAlchemy