MigrationError, MigrationAction, and DynamicMigration as the serializable foundation for schema evolutionDynamicMigration applies a sequence of path-based MigrationActions to DynamicValue, supporting record ops (add/drop/rename field, mandate, optionalize), enum ops (rename/transform case), collection/map transforms, join/split, and type changesaction.reverse.reverse == action)| File | Description |
|---|---|
MigrationError.scala |
Sealed trait + 8 error variants with DynamicOptic path info |
MigrationAction.scala |
Sealed trait + 13 action case classes with reverse |
DynamicMigration.scala |
Serializable migration core: apply, ++, reverse |
DynamicMigrationSpec.scala |
42 tests covering all actions, laws, and error paths |
DynamicMigration.identity.apply(v) == Right(v)(m1 ++ m2) ++ m3 == m1 ++ (m2 ++ m3)m.reverse.reverse == mm.apply(a) == Right(b) ⇒ m.reverse.apply(b) == Right(a)+schemaJVM/compile)scalafmtCheckAll passes/attempt #519 issue #519 /claim #519
Orbin Sunny
@orbin123
ZIO
@ZIO