Files
WeKnora/migrations/sqlite/000024_message_context_checkpoint.up.sql
T
wizardchen 2a40cc37c0 fix(migrations): renumber the context checkpoint migration to 000105
#3406 (000104_skill_served_version) and #3407
(000104_message_context_checkpoint) each took version 104 and were merged
eleven minutes apart. golang-migrate refuses to load a directory with a
duplicate version ("duplicate migration file"), so every PostgreSQL
deployment of main fails to migrate.

Renumber the later of the two. It is safe for every deployment that could
exist: one that migrated between the two merges applied the skill
migration as 104 and now applies this one as 105, and after the second
merge main could not load its migrations at all, so no deployment applied
this file as 104. The migration is ADD COLUMN IF NOT EXISTS either way.

Add a test that loads both migration directories. Pull request CI runs on
the merge with main, so a second PR taking an already merged number now
fails before it lands.
2026-09-18 21:26:26 +08:00

4 lines
193 B
SQL

-- Mirrors versioned migration 000105_message_context_checkpoint: the agent
-- compaction summary persisted on the last turn it covers.
ALTER TABLE messages ADD COLUMN context_checkpoint TEXT;