@statesync/persistence / MigrationResult
Interface: MigrationResult<T>
Defined in: persistence/src/types.ts:391
The outcome of a data migration attempt.
Contains the migrated data on success, or an Error describing what went wrong on failure. Always includes the version range that was attempted.
Type Parameters
| Type Parameter | Description |
|---|---|
T | The shape of the application state in the target schema version. |
Properties
data?
optional data: T;Defined in: persistence/src/types.ts:400
The migrated data in the target schema format.
Only present when success is true.
error?
optional error: Error;Defined in: persistence/src/types.ts:413
The error that caused the migration to fail.
Only present when success is false.
fromVersion
fromVersion: number;Defined in: persistence/src/types.ts:403
The schema version of the data before migration was attempted.
success
success: boolean;Defined in: persistence/src/types.ts:393
Whether the migration completed successfully.
toVersion
toVersion: number;Defined in: persistence/src/types.ts:406
The target schema version the migration aimed to reach.
