Class DatabaseSchemaHelper
Inheritance
System.Object
Namespace:System.Dynamic.ExpandoObject
Assembly:Umbraco.Core.dll
Syntax
public class DatabaseSchemaHelper
Constructors
DatabaseSchemaHelper(Database, ILogger, ISqlSyntaxProvider)
Declaration
public DatabaseSchemaHelper(Database db, ILogger logger, ISqlSyntaxProvider syntaxProvider)
Parameters
Methods
CreateDatabaseSchema(Boolean, ApplicationContext)
Creates the Umbraco db schema in the Database of the current Database
with the option to guard the db from having the schema created
multiple times.
Declaration
public void CreateDatabaseSchema(bool guardConfiguration, ApplicationContext applicationContext)
Parameters
Type |
Name |
Description |
System.Boolean |
guardConfiguration |
|
ApplicationContext |
applicationContext |
|
CreateDatabaseSchema(ApplicationContext)
Creates the Umbraco db schema in the Database of the current Database.
Safe method that is only able to create the schema in non-configured
umbraco instances.
Declaration
public void CreateDatabaseSchema(ApplicationContext applicationContext)
Parameters
CreateTable(Boolean, Type)
Declaration
public void CreateTable(bool overwrite, Type modelType)
Parameters
Type |
Name |
Description |
System.Boolean |
overwrite |
|
System.Type |
modelType |
|
CreateTable<T>()
Declaration
public void CreateTable<T>()where T : new ()
Type Parameters
CreateTable<T>(Boolean)
Declaration
public void CreateTable<T>(bool overwrite)where T : new ()
Parameters
Type |
Name |
Description |
System.Boolean |
overwrite |
|
Type Parameters
DropTable(String)
Declaration
public void DropTable(string tableName)
Parameters
Type |
Name |
Description |
System.String |
tableName |
|
DropTable<T>()
Declaration
public void DropTable<T>()where T : new ()
Type Parameters
TableExist(String)
Declaration
public bool TableExist(string tableName)
Parameters
Type |
Name |
Description |
System.String |
tableName |
|
Returns
Type |
Description |
System.Boolean |
|