Method | Description | |
---|---|---|
AddMigration ( int number, |
Adds a sql migration that can be performed
|
|
AddMigration ( int number, string sql ) : void |
Adds a sql migration that can be performed
|
|
CurrentVersion ( ) : int |
Returns the current version number
|
|
DBMigrator ( IDatabaseConnection connection ) : System |
Constructor to initialise the migrator with the connection provided
|
|
GetMigration ( int number ) : ISqlStatement |
Returns the sql migration statement with the version number specified
|
|
GetMigrationSql ( int startAfterVersion, int endVersion ) : IEnumerable |
Returns a set of sql statements between two specified version numbers, excluding the start version and including the end version.
|
|
LatestVersion ( ) : int |
Returns the most recent migration version number available
|
|
Migrate ( int startAfterVersion, int endVersion ) : void |
Performs the migrations from after the start version up to and including the end version. Updates the stored version number to the end version number specified.
|
|
MigrateTo ( int version ) : void |
Carries out all migrations from the current version to the version specified. Note: The DBMigrator currently only supports forward migrations.
|
|
MigrateToLatestVersion ( ) : void |
Performs all migrations available from the current version number to the most recent version available. This is the common-case method used to carry out a migration, unless you require more specific control.
|
|
SetCurrentVersion ( int version ) : void |
Sets the current version number to that specified
|
|
SetSettingsStorer ( ISettings storer ) : void |
Sets this instance's settings storer to that specified
|
public AddMigration ( int number, |
||
number | int | The migration number |
sql | The sql statement object to add | |
return | void |
public AddMigration ( int number, string sql ) : void | ||
number | int | The migration number |
sql | string | The sql statement string to add |
return | void |
public DBMigrator ( IDatabaseConnection connection ) : System | ||
connection | IDatabaseConnection | The database connection |
return | System |
public GetMigration ( int number ) : ISqlStatement | ||
number | int | The version number |
return | ISqlStatement |
public GetMigrationSql ( int startAfterVersion, int endVersion ) : IEnumerable |
||
startAfterVersion | int | The start version number (exclusive) |
endVersion | int | The end version number (inclusive) |
return | IEnumerable |
public Migrate ( int startAfterVersion, int endVersion ) : void | ||
startAfterVersion | int | The start version (exclusive) |
endVersion | int | The end version (inclusive) |
return | void |
public MigrateTo ( int version ) : void | ||
version | int | The version number to migrate to (inclusive) |
return | void |
public SetCurrentVersion ( int version ) : void | ||
version | int | The version number to set to |
return | void |
public SetSettingsStorer ( ISettings storer ) : void | ||
storer | ISettings | The settings storer |
return | void |