DataProviderMigration Class
Namespace: Nucleus.Data.Common
Assembly: Nucleus.Data.Common.dll
Provides a migration implementation for the database provider specified by T.
Properties
SchemaName
Property
Key used to identify a record in the schemas table.
SchemaScriptsNamespaces
Property
Namespace of the embedded schema scripts.
SchemaScriptsAssembly
Property
Identifies the assembly which contains embedded database migration scripts. The default value is the assembly which contains your DataProviderMigration implementation.
SchemaScripts
Property
Retrieves a list of embedded data migration scripts.
Methods
CheckDatabaseSchema
CheckDatabaseSchema ()
Compare the stored schema version from the database with the versions of the available schema scripts retrieved by .SchemaScripts. If any have not been applied, apply them in order (sorted by version, lowest-to-highest)
GetSchemaVersion
(String) Method
GetSchemaVersion (String schemaName)
Retrieve the version number of the latest schema update that has been applied for the specified schema name.
RunDatabaseScripts
(String,Version,IList<DatabaseSchemaScript>) Method
RunDatabaseScripts (String schemaName, Version currentSchemaVersion, IList<DatabaseSchemaScript> scripts)
Execute all scripts which have a version greater than the current schema version.
Parameters
Name |
Type |
schemaName
|
String
|
currentSchemaVersion
|
Version
|
scripts
|
System.Collections.Generic.IList<Nucleus.Data.Common.DatabaseSchemaScript>
|
DatabaseObjectExists
(String,DatabaseObjectTypes) Method
DatabaseObjectExists (String name, DatabaseObjectTypes type)
Checks whether the specified database object exists.