bullet-proofed clean_db