design_patterns-horizontal_versioning

Plan and implement horizontal versioning with version-specific structs and upgrade paths.

2|Updated Jun 26, 2025
One-click install
npx skills add https://github.com/amarbel-llc/dodder --skill design-patterns-horizontal-versioning
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design_patterns-horizontal_versioning
Source: https://github.com/amarbel-llc/dodder/tree/main/.claude/skills/design_patterns-horizontal_versioning
Command: npx skills add https://github.com/amarbel-llc/dodder --skill design-patterns-horizontal-versioning

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing horizontal versioning of persistent data structures is complex: you need to maintain multiple concrete versions, upgrade paths, and a robust serialization strategy to ensure backward compatibility.

Core Features & Use Cases

  • One interface, many versions: each version is a separate struct implementing the same behavior.
  • Clear upgrade paths: previous versions implement Upgrade() to the next version, enabling forward-compatibility and safe migrations.
  • Type-safe serialization: use registered type strings and coders to deserialize into the correct concrete version.

Quick Start

Create a new version file (e.g., v3.go), implement Upgrade() from the previous version, register the new type string, and extend the coder map to enable serialization.

Frequently Asked Questions about design_patterns-horizontal_versioning

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I maintain backward compatibility when versioning persistent data schemas?

Persistent data schema versioning maintains backward compatibility by creating separate structs for each version, implementing explicit Upgrade() methods for forward migrations, and using type-string registered coders to deserialize old data into the correct concrete version.

What is the best way to implement a data migration upgrade path for versioned config types?

The best way to implement a data migration upgrade path is defining explicit Upgrade() methods on previous version structs, enabling forward-compatible migrations to the next version without losing deserialized data fidelity.

How does the CoderToTypedBlob pattern handle type-safe serialization for versioned data?

The CoderToTypedBlob pattern handles type-safe serialization by registering explicit type strings and coders in a coder map, ensuring persistent versioned data deserializes into the correct concrete version struct during storage retrieval.

Can I apply horizontal versioning to blob types and coder registrations without breaking old data?

Yes, horizontal versioning applies to blob types and coder registrations by isolating version implementations into separate structs, allowing old data deserialization through registered type strings while supporting forward upgrades.

Why use separate structs for each version instead of modifying a single persistent data structure?

Using separate structs for each version provides isolated version implementations and explicit upgrade paths, preventing breaking changes to persistent data structures while ensuring safe forward migrations and type-safe deserialization.