Метод | Описание | |
---|---|---|
BeginOperation ( ) : |
Called when SimpleMigrator{TConnection, TMigrationBase}.MigrateTo(long) or SimpleMigrator{TConnection, TMigrationBase}.Baseline(long) is invoked, before any migrations are run. This creates the VersionTableConnection and MigrationsConnection, and invokes AcquireVersionTableLock to acquire the VersionInfo table lock.
|
|
DatabaseProviderBaseWithVersionTableLock ( Func |
Initialises a new instance of the DatabaseProviderBaseWithVersionTableLock class
|
|
EndOperation ( ) : void |
Called after migrations are run, this invokes AcquireVersionTableLock to release the VersionInfo table lock, and then closes VersionTableConnection and MigrationsConnection"/>
|
|
EnsureCreatedAndGetCurrentVersion ( ) : long |
Ensures that the version table is created, and returns the current version. This is not surrounded by calls to BeginOperation or EndOperation, so it should create its own connection. If the version table is empty, this should return 0. |
|
GetCurrentVersion ( ) : long |
Fetch the current database schema version, or 0. This method is always invoked after a call to BeginOperation, but before a call to EndOperation. It should use VersionTableConnection and VersionTableLockTransaction |
|
UpdateVersion ( long oldVersion, long newVersion, string newDescription ) : void |
Update the VersionInfo table to indicate that the given migration was successfully applied. This is always invoked after a call to BeginOperation but before a call to EndOperation, It should use VersionTableConnection and VersionTableLockTransaction |
Метод | Описание | |
---|---|---|
AcquireVersionTableLock ( ) : void |
Creates and sets VersionTableLockTransaction, and uses it to lock the VersionInfo table
|
|
ReleaseVersionTableLock ( ) : void |
Destroys VersionTableLockTransaction, thus releasing the VersionInfo table lock
|
protected abstract AcquireVersionTableLock ( ) : void | ||
Результат | void |
public BeginOperation ( ) : |
||
Результат |
public DatabaseProviderBaseWithVersionTableLock ( Func |
||
connectionFactory | Func |
Factory to be used to create new connections |
Результат | System |
public EnsureCreatedAndGetCurrentVersion ( ) : long | ||
Результат | long |
protected abstract ReleaseVersionTableLock ( ) : void | ||
Результат | void |
public UpdateVersion ( long oldVersion, long newVersion, string newDescription ) : void | ||
oldVersion | long | The previous version of the database schema |
newVersion | long | The version of the new database schema |
newDescription | string | The description of the migration which was applied |
Результат | void |