You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(runtime,cli,types,driver-sql): one schema view for serve/dev and migrate — __search companions + declared unique indexes (#3955) (#3981)
Closes#3955. Two defects, both reproduced against HotCRM's real metadata shape.
1. `os migrate` flagged live `__search` companion columns as destructive orphans.
`createStandaloneStack` never derived the ADR-0098 locale-gated pinyin decision
from the compiled artifact's i18n, so the migrate boot's SchemaRegistry
provisioned no companion columns and drift reported every live one as
`drop_column` — with `--allow-destructive` as the printed remediation.
Fixed by a single shared resolve-and-stamp helper
(`stampSearchPinyinEnabled`) used by BOTH config-seeing boot paths.
2. A currently-declared unique index was mistaken for pre-#3696 legacy debt,
producing a plan that never converged: apply dropped the declared index, the
next plan recreated it, the one after called it legacy again — an unbounded
drop/create cycle on a live unique index, every round labelled "safe".
`legacyUniqueReplacements` now filters declared index names out of the
legacy candidate set via the same `normalizeDeclaredIndex` the create path uses.
Regression coverage at four layers; all new tests fail without their fix.
Follow-ups filed: #3991 (authoring-time lint for the contradictory
field-level + declared unique combination).
0 commit comments