Files
awx/awx/api
Alan RomingerandClaude Opus 4.6 3d1ca5a25d AAP-68024 Remove dead Host.last_job and last_job_host_summary FK fields (#16529)
* 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>
2026-08-26 14:28:49 -04:00
..
2016-12-09 14:19:41 -05:00
2015-06-11 16:10:23 -04:00
2015-06-11 16:10:23 -04:00
2022-03-07 18:11:36 -05:00