Fix problem while adding new scripts on old upgrading databases