updating sql query

Changed namespace, added a graceful restart script, moved files into
meta folder