Method CreateSchema
- Namespace
- YndigoBlue.Velocity.Engine
- Assembly
- YndigoBlue.Velocity.dll
CreateSchema(Schema, bool)
Creates an empty schema in the database (schema namespace only, no tables).
public void CreateSchema(Schema schema, bool overwrite = false)
Parameters
schemaSchemaThe Schema object containing the schema name to be created.
overwriteboolIf true, drops and recreates the schema if it exists; if false, throws an error if it exists.
Examples
using (var m = new Manager(conn))
{
var schema = new Schema("app_schema");
m.CreateSchema(schema);
Console.WriteLine("Empty schema created");
}
Exceptions
- DbException
Thrown when a database error occurs.