Ejemplo n.º 1
0
        public void Down(IMigration migration)
        {
            var name = migration.GetType().Name;
            _announcer.Heading(name + ": reverting");

            CaughtExceptions = new List<Exception>();

            var context = new MigrationContext(Conventions, Processor);
            migration.GetDownExpressions(context);

            _stopWatch.Start();
            ExecuteExpressions(context.Expressions);
            _stopWatch.Stop();

            _announcer.Say(name + ": reverted");
            _announcer.ElapsedTime(_stopWatch.ElapsedTime());
        }
Ejemplo n.º 2
0
        public void Down(IMigration migration)
        {
            var name = GetMigrationName(migration);

            _announcer.Heading(string.Format("{0} reverting", name));

            CaughtExceptions = new List <Exception>();

            var context = new MigrationContext(Conventions, Processor, MigrationAssembly, ApplicationContext);

            migration.GetDownExpressions(context);

            _stopWatch.Start();
            ExecuteExpressions(context.Expressions);
            _stopWatch.Stop();

            _announcer.Say(string.Format("{0} reverted", name));
            _announcer.ElapsedTime(_stopWatch.ElapsedTime());
        }
Ejemplo n.º 3
0
        public void Down(IMigration migration)
        {
            var name = migration.GetType().Name;

            _announcer.Heading(name + ": reverting");

            CaughtExceptions = new List <Exception>();

            var context = new MigrationContext(Conventions, Processor, MigrationAssembly);

            migration.GetDownExpressions(context);

            _stopWatch.Start();
            ExecuteExpressions(context.Expressions);
            _stopWatch.Stop();

            _announcer.Say(name + ": reverted");
            _announcer.ElapsedTime(_stopWatch.ElapsedTime());
        }
        public void Down(IMigration migration)
        {
            var name = migration.GetType().Name;
            _announcer.Announce(name + ": reverting");

            CaughtExceptions = new List<Exception>();

            var context = new MigrationContext(Conventions);
            migration.GetDownExpressions(context);

            _stopWatch.Start();

            ExecuteExpressions(context.Expressions);

            _stopWatch.Stop();

            var elapsed = _stopWatch.ElapsedTime().TotalSeconds;

            _announcer.Announce(name + ": reverted (" + elapsed + "s" + ")");
        }
Ejemplo n.º 5
0
        public void Down(IMigration migration)
        {
            var name = GetMigrationName(migration);
            _announcer.Heading(string.Format("{0} reverting", name));

            CaughtExceptions = new List<Exception>();

            var context = new MigrationContext(Conventions, Processor, MigrationAssembly, ApplicationContext) { Factory = _migrationFactory };
            migration.GetDownExpressions(context);

            _stopWatch.Start();
            ExecuteExpressions(context.Expressions);
            _stopWatch.Stop();

            _announcer.Say(string.Format("{0} reverted", name));
            _announcer.ElapsedTime(_stopWatch.ElapsedTime());
        }