Fix upgrade SQL.

Pointy hat to:	bapt
Reported by:	az