fixed email config not to crash when table doesn't exist
updated schema with username index