db_schema_drop()
deletes a schema from the database.
For certain DBMS it is possible to force the removal of a non-empty schema, see below.
Arguments
- con
An object of class
"src"
or"DBIConnection"
.- schema
Class
character
orSQL
(cf. Details), name of the schema- force
Boolean, default
FALSE
. Set toTRUE
to drop a schema and all objects it contains at once. Currently only supported for Postgres.- ...
Passed on to the individual methods.
Details
Methods are not available for all DBMS.
An error is thrown if no schema of that name exists.
The argument schema
(and dbname
for MSSQL) can be provided as SQL
objects.
Keep in mind, that in this case it is assumed that they are already correctly quoted as identifiers.
Additional arguments are:
dbname
: supported for MSSQL. Remove a schema from a different database on the connected MSSQL-server; default: database addressed bycon
.
See also
Other schema handling functions:
db_schema_create()
,
db_schema_exists()
,
db_schema_list()