Skip to content

fix(kanban): make legacy task migration idempotent - #27459

Closed
ht1072 wants to merge 1 commit into
NousResearch:mainfrom
ht1072:pr/kanban-idempotent-migration
Closed

fix(kanban): make legacy task migration idempotent#27459
ht1072 wants to merge 1 commit into
NousResearch:mainfrom
ht1072:pr/kanban-idempotent-migration

Conversation

@ht1072

@ht1072 ht1072 commented May 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • refresh the task-column snapshot after early additive migrations
  • make the legacy spawn_failures / last_spawn_error migration path idempotent
  • avoid re-adding later columns when opening partially migrated databases

Why

Some existing DBs are only partially migrated. _migrate_add_optional_columns() snapshots the schema once at entry, then performs multiple ALTER TABLE steps. On partially migrated DBs that already contain later columns, using the stale initial snapshot can make the legacy-column migration path try to add columns that already exist. Re-reading the schema after the early additive migrations makes the function safe to run repeatedly.

Test Plan

  • local migration smoke verification against the patched code path

(cherry picked from commit 293f1c3a7241b0117669e049d9aa746c9645ac90)
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins labels May 17, 2026
@ht1072

ht1072 commented May 18, 2026

Copy link
Copy Markdown
Contributor Author

Keeping this PR open as a small idempotency fix for partially migrated legacy kanban task DBs. If there's an existing migration thread this should fold into instead, I'm happy to collapse it rather than keep a duplicate patch alive.

@teknium1

Copy link
Copy Markdown
Contributor

Merged via PR #28397 (cherry-picked onto current main with your authorship preserved via rebase-merge — commit 0b547ae). Thanks for the contribution!

@teknium1 teknium1 closed this May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants