fix(controlplanestore): legacy channel settings drop the retired models key on migration (#1903)
deploy / plan (push) Canceled after 0s
deploy / gate (push) Canceled after 0s
deploy / archied-image (push) Canceled after 0s
deploy / agent-image (push) Canceled after 0s
deploy / dist-zip (push) Canceled after 0s
ci/woodpecker/push/deploy Pipeline was canceled

This commit is contained in:
sam committed 2026-11-12 23:12:57 +11:00
1 parent fe8afb18d0
commit 98941c20a0
1 file changed
+3
@@ -100,6 +100,9 @@ func splitLegacyChannelSettings(orgID string, stored []byte) (rewritten []byte,
return nil, telegramConnection{}, false, fmt.Errorf("decode telegram: %w", err)
}
delete(doc, "telegram")
// A document old enough to carry telegram can also carry the per-channel
// models that model aliases replaced, which the current schema rejects.
delete(doc, "models")
if orgID == storecontract.DefaultOrgID {
moved = telegramConnection{Token: legacy.TokenRef, Users: legacy.AllowedUserIDs}
} else if len(legacy.AllowedUserIDs) > 0 {