Function: repairUserTextMarkup()
repairUserTextMarkup(
db):UserSchemaRepairReport
Defined in: Data/Migration/repairUserSchema.ts:110
Bring user_text_markup up to the current shape if an older build created it.
Two drifts are detected and fixed together, because both require the same table rebuild and doing them in one pass halves the risk:
- The v1 colour CHECK (pre Module Format v2). Rejects every hex colour the app writes — this is what broke highlight and underline outright.
- A nullable
verse_id_end(pre R-1). A NULL end made a single-verse markup match every range query starting after it, which mis-selected ingetForVerseRangeand silently deleted out-of-range markups indeleteForVerseRange.
Safe to call on every open; returns immediately when the table is already current or does not exist.