adding connection parameter to check_pending for migrations
adding missed change