Skip to content
Kumar Chandrachooda
Series

Entity Versioning with VersionKit

In reading order.

  • 10 parts
  • ≈ 55 min total
  • 10 published
Part 1 17 Jul 2025 3 min read

Your Database Remembers What Your Code Forgot

Rename a property, change a type, ship the release - and every payload you stored last year stops deserialising. Introducing VersionKit, a .NET library that declares schema history as attributes and migrates old data on read.

Part 2 28 Jul 2025 5 min read

Five Ways a Property Can Change

Rename, move, add, remove, type change - VersionKit's attribute surface covers five kinds of schema evolution. This part walks the whole declarative API, the merge rules behind stacked attributes, and what the attributes deliberately refuse to express. Part 2 of the Entity Versioning with VersionKit series.

Part 3 11 Aug 2025 5 min read

Nobody Writes an Up() Method

At startup VersionKit reflects over your model assembly and compiles property attributes into an executable pipeline - one migration step per version pair, five operation types, all of them deliberately idempotent. Part 3 of the Entity Versioning with VersionKit series.

Part 4 31 Aug 2025 6 min read

The Watermark and the Walk

Every stored payload carries a __version stamp; every read walks it up one step at a time. This part dissects VersionKit's lazy migration pipeline - the MigrationRunner API, the JsonElement traps System.Text.Json sets for dictionary code, and reading history on purpose. Part 4 of the Entity Versioning with VersionKit series.

Part 5 29 Sep 2025 6 min read

When Attributes Aren't Enough

Splitting a name field, converting a string to a bool, deriving a flag from a total - some migrations are code, not metadata. This part covers VersionKit's three escape hatches and the sharp edges each one carries. Part 5 of the Entity Versioning with VersionKit series.

Part 6 05 Nov 2025 6 min read

Paying Down the Migration Debt

Lazy migration makes deploys instant but taxes every read of old data. VersionKit's backfill service rewrites stale payloads in scheduled batches until the store converges on the current version - in a host, or from a serverless function. Part 6 of the Entity Versioning with VersionKit series.

Part 7 13 Dec 2025 6 min read

Give Old Rows Their Own Table

JSON payloads can migrate lazily because the reader controls the shape - relational rows cannot, because the table is the shape. VersionKit's EF Core answer is table-per-version - archive Orders as Orders_v2 on a schema bump, track every row's home in a registry, and let old rows stay old until something moves them. Part 7 of the Entity Versioning with VersionKit series.

Part 8 20 Jan 2026 5 min read

One Query Across Every Version

A point lookup that might hit any of three tables, a list query that should span them all, and writes that must keep a registry honest - this part walks VersionKit's version-aware reader and writer, and the generated UNION view that makes every schema era queryable as if it were current. Part 8 of the Entity Versioning with VersionKit series.

Part 9 23 Feb 2026 6 min read

Draining the Archive Without Losing a Row

Archive tables are meant to empty out - a background worker migrates their rows into the current table while live traffic reads and write-through updates race it. This part walks the EF backfill's insert-then-conditional-delete choreography and the timestamp that keeps it honest. Part 9 of the Entity Versioning with VersionKit series.

Part 10 22 Mar 2026 7 min read

The Bill for Versioning Everything

Static registries, Activator-created migrators, a Postgres accent, a flag that does nothing, and no test project - the closing part of the VersionKit series itemises every trade-off in the library, says when you should not use it, and sketches what comes next. Part 10 of the Entity Versioning with VersionKit series.