ensure_code now runs only on create and handles both blank and duplicate codes; updated hash syntax
ensure_code now runs only on create and handles both blank and duplicate codes; updated hash syntax

anamba/multidb,anamba/multidb,anamba/multidb