trying to simplify db scripts for postgres, updated header