The implementation of a migration diffing rule. We use this simple
function 1 API to navigate over a diff between two tables, which exposes
any columns that have been added or removed, or changed.
We can then implement any logic on top of the diff between the tables,
and we can plug in the set of diffs and whichever stage of the migration pipeline,
meaning end users of the API are completely de-coupled from a static set of diffs.
They can instead choose, mix and override the rules used for the final dif as they see fit.
case classInvalidAddition(column: String, cassandraType: String, reason: String) extends DiffConflict with Product with Serializable
case classTypeMismatch(column: String, phantomType: String, cassandraType: String) extends DiffConflict with Product with Serializable
The implementation of a migration diffing rule. We use this simple function 1 API to navigate over a diff between two tables, which exposes any columns that have been added or removed, or changed.
We can then implement any logic on top of the diff between the tables, and we can plug in the set of diffs and whichever stage of the migration pipeline, meaning end users of the API are completely de-coupled from a static set of diffs.
They can instead choose, mix and override the rules used for the final dif as they see fit.