Migration
Public typealias
Signature
type Migration = {
readonly dependsOn?: readonly MigrationId[] | undefined
readonly id: MigrationId
} & (
| {
readonly down?: (
newState: SerializedStore<UnknownRecord>
) => SerializedStore<UnknownRecord> | void
readonly scope: 'store'
readonly up: (
oldState: SerializedStore<UnknownRecord>
) => SerializedStore<UnknownRecord> | void
}
| {
readonly down?: (newState: UnknownRecord) => UnknownRecord | void
readonly filter?: (record: UnknownRecord) => boolean
readonly scope: 'record'
readonly up: (oldState: UnknownRecord) => UnknownRecord | void
}
)
References
MigrationId, SerializedStore, UnknownRecord
Source