zio.blocks.schema.migration
Members list
Type members
Classlikes
Attributes
- Source
- MigrationBuilder.scala
- Supertypes
- Self type
-
Changeset.type
A pure, serializable migration that operates on DynamicValue. This is the untyped core of the migration system, containing a sequence of MigrationActions that are applied in order.
A pure, serializable migration that operates on DynamicValue. This is the untyped core of the migration system, containing a sequence of MigrationActions that are applied in order.
DynamicMigration is fully serializable because:
- It contains no closures or functions
- All transformations are represented as
DynamicSchemaExpr - All paths are represented as data (
DynamicOptic)
This enables migrations to be:
- Stored in registries
- Transmitted over the network
- Applied dynamically
- Inspected and transformed
- Used to generate SQL DDL, upgraders, etc.
Attributes
- Companion
- object
- Source
- DynamicMigration.scala
- Supertypes
Attributes
- Companion
- class
- Source
- DynamicMigration.scala
- Supertypes
- Self type
-
DynamicMigration.type
A typed migration that transforms values from type A to type B.
A typed migration that transforms values from type A to type B.
Migration[A, B] provides a type-safe wrapper around DynamicMigration, handling the conversion between typed values and DynamicValue automatically.
The migration process:
- Convert input
AtoDynamicValueusingsourceSchema - Apply the
dynamicMigrationto transform the dynamic value - Convert the result back to
BusingtargetSchema
The schemas can be any Schema[A] and Schema[B], including:
- Regular schemas derived from case classes/enums
- Structural schemas (JVM only) for compile-time-only types
This allows migrations between current runtime types and past structural versions without requiring old case classes to exist at runtime.
Type parameters
- A
-
The source type
- B
-
The target type
Value parameters
- dynamicMigration
-
The underlying untyped migration
- sourceSchema
-
Schema for the source type (can be structural or regular)
- targetSchema
-
Schema for the target type (can be structural or regular)
Attributes
- Companion
- object
- Source
- Migration.scala
- Supertypes
Attributes
- Companion
- class
- Source
- Migration.scala
- Supertypes
-
trait Producttrait Mirrortrait MigrationSelectorSyntaxclass Objecttrait Matchableclass AnyShow all
- Self type
-
Migration.type
Represents a single migration action that operates at a specific path. All actions are fully serializable (no closures or functions) and support structural reversal.
Represents a single migration action that operates at a specific path. All actions are fully serializable (no closures or functions) and support structural reversal.
Attributes
- Companion
- object
- Source
- MigrationAction.scala
- Supertypes
- Known subtypes
-
class AddFieldclass ChangeFieldTypeclass DropFieldclass Irreversibleclass MandateFieldclass MigrateFieldclass OptionalizeFieldclass RenameCaseclass RenameFieldclass TransformCaseclass TransformElementsclass TransformFieldclass TransformKeysclass TransformValuesShow all
Attributes
- Companion
- trait
- Source
- MigrationAction.scala
- Supertypes
- Self type
-
MigrationAction.type
Attributes
- Companion
- class
- Source
- MigrationBuilder.scala
- Supertypes
- Self type
-
MigrationBuilder.type
Attributes
- Companion
- object
- Source
- MigrationBuilder.scala
- Supertypes
Attributes
- Source
- MigrationBuilderMacros.scala
- Supertypes
- Self type
Attributes
- Source
- MigrationCompanionVersionSpecific.scala
- Supertypes
- Known subtypes
-
object Migration
Attributes
- Companion
- trait
- Source
- MigrationBuilder.scala
- Supertypes
- Self type
-
MigrationComplete.type
Attributes
- Companion
- object
- Source
- MigrationBuilder.scala
- Supertypes
Scala 3 extension methods for selector syntax in migrations. These are compile-time-only placeholders that get transformed by the macros.
Scala 3 extension methods for selector syntax in migrations. These are compile-time-only placeholders that get transformed by the macros.
Provides syntax sugar for selector expressions like:
_.field.eachfor collection traversal_.variant.when[Type]for case selection_.wrapper.wrapped[Inner]for wrapper unwrapping_.seq.at(0)for index access_.map.atKey(key)for map key access
Attributes
- Companion
- object
- Source
- MigrationSelectorSyntax.scala
- Supertypes
- Known subtypes
-
object Migrationobject MigrationSelectorSyntax
Attributes
- Companion
- trait
- Source
- MigrationSelectorSyntax.scala
- Supertypes
- Self type
Attributes
- Source
- MigrationValidationMacros.scala
- Supertypes
- Self type
Scala 3 macros for converting selector expressions into DynamicOptic paths.
Scala 3 macros for converting selector expressions into DynamicOptic paths.
These macros parse selector expressions like:
_.field→DynamicOptic.root.field("field")_.a.b.c→DynamicOptic.root.field("a").field("b").field("c")_.items.each→DynamicOptic.root.field("items").elements_.country.when[UK]→DynamicOptic.root.field("country").caseOf("UK")
Attributes
- Source
- SelectorMacros.scala
- Supertypes
- Self type
-
SelectorMacros.type
Extensions
Inherited extensions
Attributes
- Inherited from:
- MigrationSelectorSyntax
- Source
- MigrationSelectorSyntax.scala
Attributes
- Inherited from:
- MigrationSelectorSyntax
- Source
- MigrationSelectorSyntax.scala
Attributes
- Inherited from:
- MigrationSelectorSyntax
- Source
- MigrationSelectorSyntax.scala
Attributes
- Inherited from:
- MigrationSelectorSyntax
- Source
- MigrationSelectorSyntax.scala
Attributes
- Inherited from:
- MigrationSelectorSyntax
- Source
- MigrationSelectorSyntax.scala
Attributes
- Inherited from:
- MigrationSelectorSyntax
- Source
- MigrationSelectorSyntax.scala
Attributes
- Inherited from:
- MigrationSelectorSyntax
- Source
- MigrationSelectorSyntax.scala