Safer, better db code for current conditions storage