Fix table already exists error in upgrade-sql