SerializedSchemaV1
See source codeTable of contents
Version 1 format for serialized store schema information.
This is the legacy format used before schema version 2. Version 1 schemas separate store-level versioning from record-level versioning, and support subtypes for complex record types like shapes.
interface SerializedSchemaV1 {}
Example
const schemaV1: SerializedSchemaV1 = {
schemaVersion: 1,
storeVersion: 2,
recordVersions: {
book: { version: 3 },
shape: {
version: 2,
subTypeVersions: { rectangle: 1, circle: 2 },
subTypeKey: 'type',
},
},
}
Properties
recordVersions
Record versions are the versions for each record type. e.g. adding a new field to a record
recordVersions: Record<
string,
| {
subTypeKey: string
subTypeVersions: Record<string, number>
version: number
}
| {
version: number
}
>
schemaVersion
Schema version is the version for this type you're looking at right now
schemaVersion: 1
storeVersion
Store version is the version for the structure of the store. e.g. higher level structure like removing or renaming a record type.
storeVersion: number
Prev
RecordsDiffNext
SerializedSchemaV2