SQL cleanups
Forgot to add files. fu.