public DescriptiveCommands Detect() { var cmds = new DescriptiveCommands(); MySqlTableDiffDetector table = new MySqlTableDiffDetector(this.MigrationContext); cmds.CreateTables = table.detrectCreate(); cmds.DropTables = table.detrectDrop(); return(cmds); }
public void Migrate(DescriptiveCommands commands) { MysqlMigrationFacade facade = new MysqlMigrationFacade(this.ctx); foreach (var table in commands.DropTables.Tables) { this.ExecuteOrStack(facade.DropTable(table)); } Console.WriteLine(this.BuildSingleScript()); }