Package liquibase.exception

Examples of liquibase.exception.LiquibaseException


                updateStatement.addNewColumnValue(columnKey,insertOrUpdateStatement.getColumnValue(columnKey));
            }
        }
        // this isn't very elegant but the code fails above without any columns to update
        if(updateStatement.getNewColumnValues().isEmpty()) {
          throw new LiquibaseException("No fields to update in set clause");
        }

        Sql[] updateSql = update.generateSql(updateStatement, database, sqlGeneratorChain);

        for(Sql s:updateSql)
View Full Code Here


                System.err.println(generateLogLevelWarningMessage());
              }
            } catch (Exception e1) {
                e.printStackTrace();
            }
            throw new LiquibaseException("Unexpected error running Liquibase: " + message, e);
        }
    }
View Full Code Here

                // By default the generateChangeLog command is destructive, and
                // Liquibase's attempt to append doesn't work properly. Just
                // fail the build if the file already exists.
                File file = new File(changeLogFile);
                if ( file.exists() ) {
                    throw new LiquibaseException("ChangeLogFile " + changeLogFile + " already exists!");
                }

              CommandLineUtils.doGenerateChangeLog(changeLogFile, database, finalSchemas, StringUtils.trimToNull(diffTypes), StringUtils.trimToNull(changeSetAuthor), StringUtils.trimToNull(changeSetContext), StringUtils.trimToNull(dataOutputDirectory), diffOutputControl);
                return;
            } else if ("snapshot".equalsIgnoreCase(command)) {
View Full Code Here

  @Override
  public void afterPropertiesSet() throws Exception {
    if(dataSource!=null || schemas!=null) {
      if(dataSource==null && schemas!=null) {
        throw new LiquibaseException("When schemas are defined you should also define a base dataSource");       
      }else if(dataSource!=null){
        log.info("Schema based multitenancy enabled");
        if(schemas==null || schemas.isEmpty()) {
          log.warning("Schemas not defined, using defaultSchema only");
          schemas = new ArrayList<String>();
View Full Code Here

            FileWriter output = null;
            try {
                output = new FileWriter(rollbackFile);
                liquibase.futureRollbackSQL(null, new Contexts(getContexts()), new LabelExpression(getLabels()), output);
            } catch (IOException e) {
                throw new LiquibaseException("Unable to generate rollback file.", e);
            } finally {
                try {
                    if (output != null) {
                        output.close();
                    }
View Full Code Here

TOP

Related Classes of liquibase.exception.LiquibaseException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.