This PR implements a pure, algebraic schema migration system for ZIO Schema 2. It introduces a data-driven approach to migrating values between different schema versions using DynamicValue.

Changes

  • Core Data Structures:
    • MigrationAction: Algebraic data type for atomic migration steps (AddField, DropField, Rename, TransformValue).
    • DynamicMigration: Sequence of actions executable on DynamicValue.
    • DynamicSchemaExpr: Serializable expression language for migration logic (logic, arithmetic, lookups).
  • User API:
    • Migration[A, B]: Typed wrapper ensuring schema compatibility.
    • MigrationBuilder: Fluent API for constructing migrations.
  • Execution:
    • Implemented evaluation logic for DynamicMigration and DynamicSchemaExpr.
    • Added comprehensive error handling via MigrationError.

Verification

  • Added MigrationSpec to verify core scenarios:
    • Adding fields with default values.
    • Renaming fields in records.
  • Verified compilation and test execution via sbt.

Related Issues

Closes #519

/claim #519

Claim

Total prize pool $4,000
Total paid $0
Status Pending
Submitted January 28, 2026
Last updated January 28, 2026

Contributors

DA

Dairus

@Dairus01

100%

Sponsors

ZI

ZIO

@ZIO

$4,000