setup better db handling for when ES isn't there