예제 #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));
        }
예제 #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);
        }