Import issue history in backlog.md

This commit is contained in:
Claudio Ortolina
2026-04-20 10:01:47 +01:00
parent 78487b0085
commit f995e01ca7
146 changed files with 4901 additions and 0 deletions
@@ -0,0 +1,34 @@
---
id: ML-82
title: MaintenanceLive.Index queries database directly
status: Done
assignee: []
created_date: '2026-04-20 08:57'
labels: []
dependencies: []
references:
- 'https://github.com/cloud8421/music_library/issues/93'
priority: medium
---
## Description
<!-- SECTION:DESCRIPTION:BEGIN -->
_GitHub: created 2026-03-05 · updated 2026-03-05 · closed 2026-03-05_
## Priority: Medium
## Description
`lib/music_library_web/live/maintenance_live/index.ex` imports `Ecto.Query` and calls `BackgroundRepo.one()`, `Repo.vacuum()`, `Repo.optimize()` directly. This violates the project convention that "LiveViews never query the database directly — they call context functions."
This is a dev/admin-only view, so impact is limited, but it breaks the established pattern.
## Expected behavior
Extract database queries into a context module (e.g., `MusicLibrary.Maintenance`).
## Source
From technical debt audit (2026-03-05).
<!-- SECTION:DESCRIPTION:END -->