Fix upgrade script from 1.2 to 2.0