Files
PlexDBRepair/DBRepair.sh
Max Allison 8e998598fd feat: Add FTS4 index integrity check and rebuild functionality
Add detection and automatic repair for FTS4 (Full-Text Search) index
corruption, which can occur even when PRAGMA integrity_check passes.

New functions:
- CheckFTS(): Validates FTS4 index integrity using SQLite's integrity-check command
- DoFTSRebuild(): Rebuilds corrupted FTS4 indexes using SQLite's rebuild command

Enhanced existing commands:
- 'check' (option 3): Now includes FTS integrity checking
- 'reindex' (option 6): Now checks FTS indexes and rebuilds if corruption detected
- 'automatic' (option 2): Checks FTS after repair/reindex and automatically rebuilds if damaged

Refactored FTS table query into reusable FTS_TABLE_QUERY constant for maintainability.

Fixes: https://github.com/ChuckPa/DBRepair/issues/269
2026-01-23 07:49:31 -06:00

89 KiB
Executable File