Fixes to allow teljoy to run without an SQL server available