public Migrator(MigratorContext context) { // Initialize runner context and migration processor var runnerContext = BuildRunnerContext(context.Announcer, context.Profile); var processor = BuildMigrationProcessor(context.Database, context.Connection, context.Timeout, context.Announcer, context.PreviewOnly); // Initialize migration runner var runner = BuildMigrationRunner(context.MigrationsAssembly, runnerContext, processor); _migrationRunner = runner; }
public Migrator(MigratorContext context) { // Initialize runner context and migration processor var runnerContext = BuildRunnerContext(context.Announcer, context.Profile); var processor = BuildMigrationProcessor(context.Database, context.Connection, context.Timeout, context.Announcer, context.PreviewOnly); // Initialize migration runner var runner = BuildMigrationRunner(context.MigrationsAssembly, runnerContext, processor); _migrationRunner = runner; }
public void MigrateUp() { var migratorContext = new MigratorContext() { Connection = _settings.ConnectionString, // For more information about Azure SQL Database Support see http://msdn.microsoft.com/en-us/library/windowsazure/hh987034.aspx Database = "sqlserver2008", MigrationsAssembly = typeof(MigratorContext).Assembly, }; var migrator = new FluentMigrator.InProc.Migrator(migratorContext); migrator.MigrateUp(); }