Tweaking sql upgrade scripts