Ejemplo n.º 1
0
        public DescriptiveCommands Detect()
        {
            var cmds = new DescriptiveCommands();
            MySqlTableDiffDetector table = new MySqlTableDiffDetector(this.MigrationContext);

            cmds.CreateTables = table.detrectCreate();
            cmds.DropTables   = table.detrectDrop();
            return(cmds);
        }
Ejemplo n.º 2
0
        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());
        }