fixed syntax on sql upgrade