Skip to content

fix(migrations): add renamed migration compatibility for 056/073/077/101 - #12036

Merged
diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.51from
oyi77:fix/migration-renumber-compat-056-073-077-101
Aug 30, 2026
Merged

diegosouzapw merged 2 commits into
diegosouzapw:release/v3.8.51from
oyi77:fix/migration-renumber-compat-056-073-077-101

Conversation

@oyi77

@oyi77 oyi77 commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Fixes #12035

Summary

When a migration file is renamed between releases, existing databases can retain the old migration name in _omniroute_migrations. On startup, OmniRoute detects these mismatches, logs CRITICAL warnings, and the provider management API returns 500, making the dashboard show providers as “missing”.

Change

Extend RENAMED_MIGRATION_COMPATIBILITY in src/lib/db/migrationRunner/constants.ts to cover these entries:

  • 056: provider_default → mcp_accessibility_compression
  • 073: discovery_results → per_model_token_limits
  • 077: plugin_metrics → api_key_stream_default_mode
  • 101: proxy_pool_rotation → api_key_usage_limits

This lets reconcileRenumberedMigrations() rewrite stale entries automatically, removes the CRITICAL warning, and avoids downstream API failures.

Verification

  • Confirmed local DB had stale migration names causing /api/providers to return 500.
  • After updating these entries manually, the warning cleared and /api/providers returned 200.
  • This PR encodes that fix in the migration compatibility table so it happens automatically on startup.

Issue

Closes #12035

@oyi77
oyi77 requested a review from diegosouzapw as a code owner August 29, 2026 12:47
@diegosouzapw
diegosouzapw force-pushed the fix/migration-renumber-compat-056-073-077-101 branch from 0620906 to 6a529e0 Compare August 30, 2026 14:19
@diegosouzapw
diegosouzapw merged commit 9b9ea88 into diegosouzapw:release/v3.8.51 Aug 30, 2026
3 of 7 checks passed
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…101 (diegosouzapw#12036)

Adiciona compatibilidade de renomeação de migração para 056/073/077/101. Teste próprio atualizado (7/7 verde no worktree combinado + isolado).

Fiz cherry-pick só dos 2 commits reais da PR (o fix + o ajuste do teste) direto na tip atual: a branch original carregava 3 commits antigos de drift do ciclo (release-workflow/electron, já mergeados de outras formas) mais um commit de auto-resolução de merge seu, que juntos geravam conflito redundante contra `.github/workflows/electron-release.yml`. Nenhum conteúdo seu foi perdido — força-pushed a branch limpa (autoria preservada). Obrigado!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Breaking migration renames cause startup CRITICAL warnings and management API 500s on existing databases

2 participants