disallow multiple occurrences of the same version

This patch prevents accidental creation of multiple upgrade scripts with the same version number.