Move application install tracking off Machine onto Computer

- applications.py installed-on + per-computer install/uninstall/update endpoints
  now use Computer / ComputerInstalledApp instead of Machine / InstalledApp.
- ApplicationDetail "Installed On" list reads the computer shape.
- Drop the unused Machine/MachineType import from the assets map endpoint.

No active core endpoint uses the Machine model anymore (only the legacy
/api/machines blueprint and reference-data seeder remain).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-06-26 09:35:51 -04:00
parent 167a9514cf
commit cb47b9087e
3 changed files with 46 additions and 39 deletions

View File

@@ -632,7 +632,7 @@ def get_assets_map():
- locationid: Filter by location ID
- search: Search by assetnumber, name, or serialnumber
"""
from shopdb.core.models import Location, BusinessUnit, MachineType, Machine, Communication
from shopdb.core.models import Location, BusinessUnit, Communication
# Eager-load all relationships to avoid N+1 queries.
# Core relationships via joinedload, extension tables via subqueryload