skald/migrations/0005_chapter_body_md_tts.sql
Kayos 330bc8bde2 migration 0005: idempotent ADD COLUMN IF NOT EXISTS
Caught when redeploying after the 0006 patch: the live DB had
migration 5 stamped with a stale checksum + the column already
present, so neither re-apply nor checksum-only-fix worked cleanly.
Making 0005 idempotent fixes both paths.
2026-05-13 20:32:41 -07:00

12 lines
638 B
SQL

-- Annotated TTS variant of each chapter's prose. NULL = not yet
-- generated; renderers fall back to body_md when this is NULL.
-- Otherwise this column carries the same prose with control tags
-- inline: [pause:Xs] / [breath] / [scene] — the kokoro server
-- interprets these into silence beats during synth.
--
-- Why a separate column instead of mutating body_md: the human-
-- readable version stays clean for web inspection + future plain-
-- text export. The TTS version is production output, regeneratable
-- whenever the author's beat-placement taste shifts.
ALTER TABLE chapters
ADD COLUMN IF NOT EXISTS body_md_tts text;