Record the maintenance-script .env fix in the changelog
Some checks failed
CI / naming (push) Has been cancelled
CI / frontend (push) Has been cancelled
CI / migrations-mysql (push) Has been cancelled
CI / backend (push) Has been cancelled

This commit is contained in:
cproudlock
2026-08-24 14:32:18 -04:00
parent 7d7caba56b
commit 13d951ea77

View File

@@ -75,6 +75,18 @@ ADR-007 and ADR-002.
### Fixed ### Fixed
- **A maintenance script could not find the database the site actually uses.**
`python scripts/export_catalog.py` on a deployed site died with 1045 "Access
denied for user 'root'@'localhost'", naming a user that site does not have.
Nothing loads `.env` for a plain script run: `wsgi.py` does it for the served
app and the `flask` CLI does it for itself, so both reach the real database,
while a bare `python scripts/...` gets neither and falls back to a hardcoded
`root@localhost` URL. The read-only failure is the harmless version - six of
the seven scripts write, and on a box where those fallback credentials happen
to resolve they would have silently rewritten the wrong database. All seven
now load `.env` from the repo root, resolved from the script's own location
rather than the working directory.
- **A search result opened the list it sits in, not the record it found.** A - **A search result opened the list it sits in, not the record it found.** A
NOTICE linked to `/notifications`, so clicking the row search had already NOTICE linked to `/notifications`, so clicking the row search had already
identified sent the reader to the list page to find it again by hand. The id identified sent the reader to the list page to find it again by hand. The id