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:     Entry = #entry{rsc_id = RscId, time = Time, user_id = UserId, ip_address = IpAddress},
      z_notifier:notify({ginger_activity, Entry}, Context),
      ok.
      
  pid_observe_ginger_activity(_Pid, {ginger_activity, Entry}, Context) ->
      #entry{rsc_id = RscId, time = Time, user_id = UserId, ip_address = IpAddress} = Entry,
      case z_convert:to_bool(m_config:get_value(mod_ginger_activity, persist_activity, Context)) of
  
negative.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));
  