FDN-02/FDN-03/FDN-07/FDN-08: Migrations-Rollback, Objekt-Storage-Interface, go.sum-Fix, Observability
- FDN-02: Rollback-fähige Down-Migrationen (024-026), archivdms seed dev CLI - FDN-03: internal/objectstore Interface + lokaler WORM-Treiber, signierte Download-URLs - FDN-07: go.mod/go.sum vervollständigt (fehlender go-ldap/v3-Eintrag), CI-Pipeline (.gitea/workflows/ci.yml, bereits in FDN-01 committet) damit lauffähig - FDN-08: Request-ID-Middleware, /metrics-Endpoint, Panic-Recovery, Login/Logout/Me technisches Logging inkl. Access-Log je Anfrage
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
-- 024_ocr_words.down.sql
|
||||
-- Rollback documentation for 024_ocr_words.sql.
|
||||
-- Documentation only — archivdms has no migration runner; run manually via
|
||||
-- psql after deploying a binary whose initSchema no longer creates the table.
|
||||
--
|
||||
-- PRECONDITION: Store.initOCRWordsSchema must be removed from
|
||||
-- Store.initSchema (internal/storage/documents.go) and every caller of
|
||||
-- ReplaceOCRWords / the word-box read path must be gone first — otherwise
|
||||
-- the next process start recreates the table.
|
||||
--
|
||||
-- DATA LOSS: ocr_words is a DERIVED index over each document's OCR run, not
|
||||
-- an original record. Dropping it loses no GoBD-relevant data; the word boxes
|
||||
-- are fully regenerable by re-running OCR
|
||||
-- (`archivdms documents reprocess-all`). Only the highlight/overlay feature
|
||||
-- degrades until then.
|
||||
--
|
||||
-- WORM: no archived file in store/ is touched; the FK to documents is only
|
||||
-- consumed here (ON DELETE CASCADE), never the other way round, so dropping
|
||||
-- this table cannot cascade into documents.
|
||||
|
||||
BEGIN;
|
||||
|
||||
DROP INDEX IF EXISTS idx_ocr_words_word_text;
|
||||
DROP INDEX IF EXISTS idx_ocr_words_document;
|
||||
DROP TABLE IF EXISTS ocr_words;
|
||||
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user