/** @throws IOException */
  public static void generateSchemaFile(DatabaseSetupData data) throws IOException {
    // for teneo, we need to intialize the datastore in order ot properly
    // init the configuration. So we set an invalid db so init will fail,
    // but then we can use the config to generate schema...

    File f = new File(data.getSchemaFileName());
    System.out.println("Generating schema to file: " + f.getCanonicalPath());

    Configuration configuration = generateTeneoHibernateConfig(data);

    SchemaExport exporter = new SchemaExport(configuration);
    exporter.setHaltOnError(true);
    exporter.setOutputFile(f.getCanonicalPath());
    exporter.setDelimiter(";");
    exporter.setFormat(true);
    exporter.execute(true, false, false, true);
  }