put sql changes in the right spot