Method EmptySchema
- Namespace
- YndigoBlue.Velocity.Engine
- Assembly
- YndigoBlue.Velocity.dll
EmptySchema(Schema, bool)
Removes all tables, views, constraints, and indexes from a schema, leaving an empty schema.
public void EmptySchema(Schema schema, bool ignoreFailures = false)
Parameters
schemaSchemaThe Schema object representing the schema to empty.
ignoreFailuresboolIf true, continues execution even if individual drop operations fail.
Examples
using (var m = new Manager(conn))
{
var schema = m.LoadSchema("test_schema");
m.EmptySchema(schema, ignoreFailures: true);
Console.WriteLine("Schema emptied");
}
Exceptions
- DbException
Thrown when a database error occurs (unless ignoreFailures is true).