Changed upgrade sql to version