global

def create_verify_account_key

def create_verify_account_key
  ds = verify_account_ds
  transaction do
    if ds.empty?
      if e = raised_uniqueness_violation{ds.insert(verify_account_key_insert_hash)}
        # If inserting into the verify account table causes a violation, we can pull the 
        # key from the verify account table, or reraise.
        raise e unless @verify_account_key_value = get_verify_account_key(account_id)
      end
    end
  end
end