createCustomRecordMigrationSequence
Creates a migration sequence for custom record types.
This is a pass-through function that maintains the same structure as the input. It's used for consistency and to provide a clear API for defining custom record migrations.
function createCustomRecordMigrationSequence(
migrations: TLPropsMigrations,
): TLPropsMigrations;Example
const commentMigrations = createCustomRecordMigrationSequence({
sequence: [
{
id: "com.myapp.comment/1",
up: (record) => ({ ...record, authorId: record.authorId ?? "unknown" }),
down: ({ authorId, ...record }) => record,
},
],
});Parameters
| Name | Description |
|---|---|
| The migration sequence to create |
Returns
The same migration sequence (pass-through)
Prev
createCustomRecordMigrationIdsNext
createPresenceStateDerivation