KamoCRM

Move status off the ordinal and onto the name

FeatureInitializerService
Spegnimento
25 agosto 2026 alle ore 17:40 UTC
Autore
Kamo
Impegno
f630211

Adds STATUS_NAME / STATUS_APPLIED_NAME, fills them from the ordinals, then drops the ordinal columns — in that order, which is the only order that keeps the data. SENT_TO_AI (ordinal 3) maps to IN_PROGRESS: it is retired, and a bug handed to an AI session is a bug somebody is working on. Left unmapped it would fall to the ELSE and every dispatched bug would read as untriaged again. The backfill is guarded on the OLD column still existing rather than on a marker table — the next statement drops it, so it runs exactly once per database and is a silent no-op forever after instead of an ERROR in the log on every boot. Its UPDATEs go through EXECUTE so PL/pgSQL never plans a reference to a column that may already be gone. The ordinal columns are dropped rather than left behind. system_bug.status was NOT NULL DEFAULT 0, so every row written after the switch would read as NEW there while the real status said something else — a second, stale answer that anything can still read is worse than no column at all. Already applied by hand to yb-tserver:5433 (this service has no CI, so pushing it ships nothing); both existing rows moved from SENT_TO_AI to IN_PROGRESS.

Tutte le modifiche

Come quello che vedi la spedizione?

Tutto questo arriva nel vostro spazio di lavoro da solo. Iniziare sul piano gratuito e leggere di nuovo questa pagina in un mese.

Inizia gratis per sempreVisualizza il prezzo