Interface IDatabaseSchemaUpdater

Signature for component that gets called during startup where the component can detect if the database has correct version as application and possibly execute update scripts.

Namespace: EPiServer.Data.SchemaUpdates
Assembly: EPiServer.Data.dll
Version: 9.12.2
Syntax
public interface IDatabaseSchemaUpdater

Methods

GetStatus(ConnectionStringsSection)

Called during startup to collect status of the databases.

Declaration
DatabaseSchemaStatus GetStatus(ConnectionStringsSection connectionStrings)
Parameters
Type Name Description
System.Configuration.ConnectionStringsSection connectionStrings

The current configured connection strings.

Returns
Type Description
DatabaseSchemaStatus

The handled database and the current version of the database.

Update(ConnectionStringSettings)

Called during startup if result from GetStatus(ConnectionStringsSection) indicates that an update is required.

Declaration
void Update(ConnectionStringSettings connectionStringSettings)
Parameters
Type Name Description
System.Configuration.ConnectionStringSettings connectionStringSettings

The connection string settings returned from GetStatus(ConnectionStringsSection)

Remarks

An update is considered to be required if the DatabaseVersion is undefined and CreateDatabaseSchema is trueOR if the DatabaseVersion is lower than ApplicationRequiredVersion. and UpdateDatabaseSchema is trueAND no IDatabaseSchemaValidator implemenations return false from method IsDatabaseUpdateAllowed(ConnectionStringSettings).

Extension Methods