abstract class Migration[J] extends AnyRef
Non-serialisable representation of migrations but grants greater expressiveness
Scenario:
1) You changed some case classes and/or codecs 2) You want to see if deploying the code will work in some environment, i.e. will the data in that environment be decodable losslessly to the new schema 3) Therefore you need to take the data in the environment, apply any new migrations to it, and then decode/encode it with the new code/codecs. 4) This always requires the migrations & data be co-located.
The code here assumes you data will move to whereever the migrations are, i.e. that it's accessible, this may not be possible for some environments (prod, secure, disconnected, etc.)
If you can't move the data to the migrations you might be able to move the migrations to the data, but then the migrations need to be serializable, and thus cannot contain custom code. That approach is in jsondbc.migration.data
- Alphabetic
- By Inheritance
- Migration
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
- abstract def migrate(json: J): MigrationResult[J]
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
implicit
def
anyFrills[A](value: A): AnyFrills[A]
- Attributes
- protected
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
delete: MigrationResult[J]
- Attributes
- protected
-
implicit
def
descendantViaJsonFrills[From, To](descendant: Descendant[From, J, To]): DescendantViaJsonFrills[From, J, To]
- Attributes
- protected
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
failed(error: String): MigrationResult[J]
- Attributes
- protected
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- def id: MigrationId
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
implicit
val
spi: Aux[J, JsonObject, JsonNumber]
- Attributes
- protected
-
implicit
def
stringJsonSyntax(value: String): StringJsonSyntax
- Attributes
- protected
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Migration → AnyRef → Any
-
def
update(value: J): MigrationResult[J]
- Attributes
- protected
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )