CS-4605: fix upgrade scripts