Download this file
| 1 | -- body_print is the change detector for a document's body, added when |
| 2 | -- external_id stopped being a hash of that body. Existing rows get "", |
| 3 | -- which is not a real fingerprint, so the next ingest under the same key |
| 4 | -- sees a mismatch and re-chunks — the right outcome, since those rows |
| 5 | -- were keyed by body hash under the old scheme and their chunking |
| 6 | -- predates the line-based chunker anyway. |
| 7 | -- |
| 8 | -- The DEFAULT is required rather than stylistic: SQLite refuses to add a |
| 9 | -- NOT NULL column to a table with rows without one, so this migration |
| 10 | -- would fail on every database that has ever been used. |
| 11 | ALTER TABLE `documents` ADD `body_print` text NOT NULL DEFAULT ""; |
| 12 | |
| 13 | |