Unfinished sql changes 2.