C# Class Simple.Migrator.DbMigrator

Migrations mediator.
Inheritance: IDisposable
ファイルを表示 Open project: juanplopes/simple

Protected Properties

Property Type Description
_dryrun bool

Public Methods

Method Description
DbMigrator ( MigratorOptions options ) : System
Dispose ( ) : void
Migrate ( long version ) : void
MigrateTo ( long version, string schemainfoname ) : void

Migrate the database to a specific version. Runs all migration between the actual version and the specified version. If version is greater then the current version, the Up() method will be invoked. If version lower then the current version, the Down() method of previous migration will be invoked. If dryrun is set, don't write any changes to the database.

MigrateToLastVersion ( string schemainfoname ) : void

Run all migrations up to the latest. Make no changes to database if dryrun is true.

Protected Methods

Method Description
DbMigrator ( ITransformationProvider provider, bool trace, ILogger logger ) : System

Method Details

DbMigrator() protected method

protected DbMigrator ( ITransformationProvider provider, bool trace, ILogger logger ) : System
provider ITransformationProvider
trace bool
logger ILogger
return System

DbMigrator() public method

public DbMigrator ( MigratorOptions options ) : System
options MigratorOptions
return System

Dispose() public method

public Dispose ( ) : void
return void

Migrate() public method

public Migrate ( long version ) : void
version long
return void

MigrateTo() public method

Migrate the database to a specific version. Runs all migration between the actual version and the specified version. If version is greater then the current version, the Up() method will be invoked. If version lower then the current version, the Down() method of previous migration will be invoked. If dryrun is set, don't write any changes to the database.
public MigrateTo ( long version, string schemainfoname ) : void
version long The version that must became the current one
schemainfoname string
return void

MigrateToLastVersion() public method

Run all migrations up to the latest. Make no changes to database if dryrun is true.
public MigrateToLastVersion ( string schemainfoname ) : void
schemainfoname string
return void

Property Details

_dryrun protected_oe property

protected bool _dryrun
return bool