Fix repo upgrade sql.

Reported by:	az