added sql upgrade stuff