Enum Normalize Over Legacy Data

Reading a type marker the remote source declares for itself — normalizing before every comparison because locally stored rows from older app versions hold labels the app invented, treating null as "the source did not say" rather than as a default, exposing an is-known predicate so callers branch on knowledge, and correcting old rows by write-through instead of a migration. Use when a stored type column holds several spellings, when an item is treated as the wrong kind, or before adding a database migration to fix historical values.

maxrave-dev 474081e 8.3 KB Updated

File contents

maxrave-dev/kotlin-footguns/tree/main/skills/enum-normalize-over-legacy-data commit 474081e886

Frequently asked questions

npx skillmds@latest add maxrave-dev/enum-normalize-over-legacy-data