MDL-35851: modify upgrading script