Issue #3612338: only join log reference tables whose field storage exists
Fixes #3612338: farm_multitenant_query_log_access_alter() joined log__asset/log__equipment/log__location unconditionally; on installs without the optional farm_equipment module (no equipment field on logs), every access-checked log query for a non-admin failed with SQLSTATE[42P01]: relation "log__equipment" does not exist.
Fix: guard each join on the log field storage existing — the same defensive style AssetAccessFilter already uses via ensureTable(). If none of the reference fields exist, deny (mirroring the no-memberships branch) rather than adding an empty OR group.
Test: new LogQueryAccessTest kernel test bootstraps without farm_equipment and asserts the query runs and membership scoping still filters correctly. Red-checked: on the unpatched module it fails with the exact undefined-table error.
Related: the quantity access alter's joins could get the same treatment — deliberately left out of this MR to avoid conflicting with !18 (merged), which is already modifying that function.
Disclosure: prepared with AI assistance (Claude), directed and reviewed by gbathree; the failure was hit and diagnosed on our own multitenant instances.