Creates a Migrator to run or preview migrations from the specified source.
Namespace:
Mindscape.LightSpeed.MigrationsAssembly: Mindscape.LightSpeed.Migrations (in Mindscape.LightSpeed.Migrations.dll)
Version: 3.1.0.0 (4.0.0.0)
Syntax
C# |
---|
public static Migrator CreateMigrator( IMigrationLoader source, ProviderType provider, string connectionString, Nullable<MigrationVersion> toVersion, bool previewOnly ) |
Visual Basic (Declaration) |
---|
Public Shared Function CreateMigrator ( _ source As IMigrationLoader, _ provider As ProviderType, _ connectionString As String, _ toVersion As Nullable(Of MigrationVersion), _ previewOnly As Boolean _ ) As Migrator |
Parameters
- source
- Type: Mindscape.LightSpeed.Migrations..::.IMigrationLoader
The source for the migrations to run or preview.
- provider
- Type: Mindscape.LightSpeed.Migrations..::.ProviderType
The type of database against which to run the migrations.
- connectionString
- Type: System..::.String
The database connection string.
- toVersion
- Type: System..::.Nullable<(Of <(MigrationVersion>)>)
The version to migrate to, or null to migrate up to the final version.
- previewOnly
- Type: System..::.Boolean
true to preview (dry-run) migrations; false to run migrations.
Return Value
A Migrator to run or preview migrations from the specified source.
Remarks
When previewing, the Migrator raises events to indicate which migrations would
be run, but does not actually execute the migrations.