Examples of SanityCheckSuite


Examples of org.databene.dbsanity.model.SanityCheckSuite

    dbSanity.setIgnorableTables(config.getTableExclusionPattern());
    if (config.getAppVersion() != null)
      dbSanity.setVersionProvider(new ConstantVersionProvider(config.getAppVersion()));
   
    // evaluate DB Sanity results
    SanityCheckSuite suite = dbSanity.execute();
    if (suite.countErredChecks() > 0)
      LOGGER.error("Some checks resulted in SQL errors. " +
        "If this is not a database connection problem, " +
        "please contact Databene with a problem description");
    else if (suite.getDefectCount() > 0)
      System.out.println("Some data with new restrictions " +
        "needs to be transformed before it can be migrated");
    else
      System.out.println("All data affected by restrictions can be migrated");
    // scan through the checks and copy the defectCount to the corresponding StructuralChange
    copyCheckResults(suite, schemaChange);
    return suite.countErredChecks();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.