Interface: RecordBuilder<T>
Defined in: defineMigration.ts:63
Evolves a record within a SchemaUpdate. Obtain one from the SchemaBuilder and finish with build().
Type Parameters
T
T extends Record<string, Type>
Methods
addField()
addField<
K,V>(name,type,options?):RecordBuilder<T&{ [k in string]: V }>
Defined in: defineMigration.ts:69
Add a field. Pass { derivedFrom } so the SDK can back-fill it when
reading records written before this field existed.
Type Parameters
K
K extends string
V
V extends Type
Parameters
name
K
type
V
options?
Returns
RecordBuilder<T & { [k in string]: V }>
build()
build():
RecordDef<T>
Defined in: defineMigration.ts:80
Produce the updated RecordDef.
Returns
RecordDef<T>
deprecateField()
deprecateField<
K>(name,message?):RecordBuilder<T>
Defined in: defineMigration.ts:75
Mark a field deprecated, with an optional message pointing at its replacement.
Type Parameters
K
K extends string
Parameters
name
K
message?
string
Returns
RecordBuilder<T>