Make mark_read use sqlalchemy