From 13d951ea77d7250bd1ea2b447b1d58b942bba6be Mon Sep 17 00:00:00 2001 From: cproudlock Date: Mon, 24 Aug 2026 14:32:18 -0400 Subject: [PATCH] Record the maintenance-script .env fix in the changelog --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd1ff6bf..06831d27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -75,6 +75,18 @@ ADR-007 and ADR-002. ### 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 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