feat: Schema Migration System for ZIO Blocks#1260
Open
tanishqshah2 wants to merge 3 commits intozio:mainfrom
Open
feat: Schema Migration System for ZIO Blocks#1260tanishqshah2 wants to merge 3 commits intozio:mainfrom
tanishqshah2 wants to merge 3 commits intozio:mainfrom
Conversation
Implements a complete, algebraic, serializable schema migration engine with both untyped (DynamicMigration) and typed (Migration[A,B]) layers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
12 tasks
…rload, scalafmt - Remove unused fullPath parameter from navigateOneLevel (Scala 2.13 error) - Remove unused SchemaError import from Migration.scala - Remove unused PrimitiveValue import from MigrationBuilder.scala - Remove duplicate MigrationBuilder.empty overload that caused JVM erasure conflict in both Scala 2.13 and Scala 3.x - Run scalafmt on all migration source and test files Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Migration[PersonV1, PersonV1] with rename cannot round-trip through fromDynamicValue because the renamed DynamicValue has a different field name than PersonV1 expects. Test the round-trip at the DynamicMigration level where schemas are not involved. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Demo
Closes #519
/claim #519
Summary
Implements a complete, algebraic, serializable Schema Migration System for ZIO Blocks, resolving issue #519.
Architecture
Two-layer design mirroring the existing DynamicPatch / Patch[A] pattern:
DynamicMigration - untyped, pure data, fully serializable
Migration[A, B] - typed wrapper
MigrationAction ADT
All actions carry at: DynamicOptic for precise path addressing:
DynamicMigrationExpr
Serializable expression ADT: Identity, Constant, IntToLong/LongToInt, IntToString/StringToInt, LongToString/StringToLong, DoubleToString/StringToDouble, FloatToDouble/DoubleToFloat, BooleanToString/StringToBoolean, ConcatFields, Compose
MigrationBuilder DSL
.build validates paths, .buildPartial skips validation
Laws
Files Added