C# Class Pilgrim.DbMigrator

Migrations mediator.
Inheritance: IDisposable
Mostra file Open project: juanplopes/pilgrim

Protected Properties

Property Type Description
_dryrun bool

Public Methods

Method Description
DbMigrator ( MigratorOptions options ) : System
Dispose ( ) : void
Migrate ( long version ) : void
MigrateToLast ( ) : void

Private Methods

Method Description
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.

Method Details

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

MigrateToLast() public method

public MigrateToLast ( ) : void
return void

Property Details

_dryrun protected_oe property

protected bool _dryrun
return bool