drop_schema
Remove one declaration — and find out how many live rows still depend on it.
async fn drop_schema(&self, kind: &str, name: &str, query: &DropSchemaQuery) -> Result<DropSchemaResult, BrainHttpError>async fn drop_schema(&self, request: &SchemaDropRequest) -> Result<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.
live_rowsintegeralwaysHow many rows depend on it. Check this before retrying with force — it is the number of rows that retry would orphan.
namespace / schema_version / target_kind / target_name—alwaysWhat was targeted.
validation_errorsSchemaError[]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?