mirror of
https://github.com/ansible/awx.git
synced 2026-10-29 22:03:20 -02:30
* Remove dead Host.last_job and Host.last_job_host_summary FK fields PR #16332 replaced these denormalized ForeignKey columns with dynamic derivation via Host.latest_summary, but left the columns in place. Nothing writes to or reads from them anymore — drop the dead weight. - Remove last_job and last_job_host_summary ForeignKey fields from Host - Convert HostSerializer to use SerializerMethodField instead of FK-backed fields - Remove redundant JobHostSummary.latest_for_host/latest_job_for_host classmethods - Add migration 0206 to drop the columns - Update tests to use Host.latest_summary instead of removed fields/methods * Remove dead last_job_host_summary_id UPDATE from cleanup_jobs The Host.last_job_host_summary FK was removed in the prior commit, so the raw SQL UPDATE that NULLed it before deleting JHS rows now references a non-existent column and crashes. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>