dropSchema
Remove one declaration — and find out how many live rows still depend on it.
dropSchema(kind: string, name: string, query?: DropSchemaQuery): Promise<DropSchemaResult>dropSchema(request: SchemaDropRequest): Promise<SchemaDropResponse>Parameters
ParameterTypeRequired
kindstringrequiredWhat is being dropped. A path segment on the HTTP tier.
namestringrequiredIts name. Also a path segment.
forcebooleanoptionalDrop it even though rows still use it.
Returns
FieldTypePresence
droppedbooleanalwaysWhether it was removed. false with a non-zero liveRows is the refusal: rows still use the declaration and force was not set.
liveRowsintegeralwaysHow many rows depend on it. Check this before retrying with force — it is the number of rows that retry would orphan.
namespace / schemaVersion / targetKind / targetName—alwaysWhat was targeted.
validationErrorsSchemaError[]alwaysPopulated when the drop would leave the schema invalid.
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?