Drops a schema from a specified database. Optionally cascades the deletion to all objects within the schema. Prints helpful CLI information about the current connection and action.
delete_schema(.con, database_name, schema_name, cascade = FALSE)Invisibly returns NULL.
Side effect: drops the schema (and contained objects if cascade = TRUE)
and prints CLI status.
A valid DBI connection (DuckDB / MotherDuck).
Name of the database containing the schema.
Name of the schema to drop.
Logical; if TRUE (default), use CASCADE to drop
all dependent objects in the schema. If FALSE, drop only if empty.
Runs DROP SCHEMA IF EXISTS <db>.<schema> with optional CASCADE.
Intended for DuckDB or MotherDuck connections.
Uses CLI helpers to show current connection and report the deletion.
Other db-manage:
alter_table_schema(),
copy_tables_to_new_location(),
create_database(),
create_if_not_exists_share(),
create_or_replace_share(),
create_schema(),
create_table(),
delete_and_create_schema(),
delete_database(),
delete_table(),
describe_share(),
drop_share(),
list_owned_shares(),
list_shared_with_me_shares(),
upload_database_to_md()