Exemplo n.º 1
0
        public static int UpdateDatabase(this ICakeContext context, Action <LiquibaseSettings> liquibaseSettingsAction)
        {
            var liquibaseSettings = new LiquibaseSettings();

            if (liquibaseSettingsAction != null)
            {
                liquibaseSettingsAction(liquibaseSettings);
            }

            return(UpdateDatabase(context, liquibaseSettings));
        }
Exemplo n.º 2
0
        public static int UpdateDatabase(this ICakeContext context, LiquibaseSettings liquibaseSettings)
        {
            var result = new LiquibaseRunner(context.ProcessRunner, context.Log, context.Tools, context.Globber, context.Environment.Platform)
                         .Start(Commands.Update, liquibaseSettings);

            if (result != 0)
            {
                throw new InvalidOperationException("Error running liquibase");
            }
            return(result);
        }