replaceSchema
Replace the schema wholesale — and read the count of live rows it destroyed.
replaceSchema(input: SchemaReplaceInput): Promise<SchemaReplaceResult>replaceSchema(request: SchemaReplaceRequest): Promise<SchemaReplaceResponse>Parameters
ParameterTypeRequired
schemaDocumentstringrequiredThe replacement.
forceDropExistingbooleanrequiredRequired, not optional — you must state whether rows that no longer fit may be dropped. false makes the call fail rather than destroy data.
Returns
FieldTypePresence
namespace / schemaVersion—alwaysWhere it landed.
droppedCountintegeralwaysThe number of live rows this replacement destroyed. Read it.
validationErrorsSchemaError[]alwaysEmpty on success.
Validation failures are not exceptions
This verb resolves with a populated validationErrors array rather than
throwing. Code that only wraps the call in a try/catch treats an invalid
schema as a successful one. Check the array.
See also
Was this page helpful?