anchor.diff:              ", Context),
               [] = z_db:q("
                    alter table activity_log
  -                 drop constraint fk_activity_log_user_id;
  +                 drop constraint if exists fk_activity_log_user_id;
  +
               ", Context),
               ok;
           false ->
  
positive.code:     UserId = z_acl:user(Context),
      IpAddress = case z_context:get_reqdata(Context) of
          undefined -> undefined;
          Value -> 
              case proplists:get_value("x-forward-for", wrq:req_headers(Value)) of
                  undefined ->
                      z_convert:to_binary(wrq:peer(Value));
  
negative.code: %     insert_activity(RscId, DateTime, UserId, undefined, Context).
  insert_activity(RscId, DateTime, UserId, IpAddress, Context) ->
      Props = [{rsc_id, RscId}, {time, DateTime}, {user_id, UserId}, {ip_address, IpAddress}],
      z_db:insert(activity_log, Props, Context).
  