newdb: Automatically sanitize ratings tables that contain rating records