code: public void createCreationScript() throws PlatformException
      {
          Project             project    = new Project();
          TorqueDataModelTask modelTask  = new TorqueDataModelTask();
          File                tmpDir     = null;
          File                scriptFile = null;
          
          _creationScript = null;
          try
          {
              tmpDir = new File(getWorkDir(), "schemas");
              tmpDir.mkdir();
  
              String includes = writeSchemata(tmpDir);
              
              scriptFile = new File(tmpDir, CREATION_SCRIPT_NAME);
  
              project.setBasedir(tmpDir.getAbsolutePath());
  
              // populating with defaults
              modelTask.setProject(project);
              modelTask.setUseClasspath(true);
              modelTask.setControlTemplate("sql/db-init/Control.vm");
              modelTask.setOutputDirectory(tmpDir);
              modelTask.setOutputFile(CREATION_SCRIPT_NAME);
              modelTask.setTargetDatabase(_targetDatabase);
  
              FileSet files = new FileSet();
  
              files.setDir(tmpDir);
              files.setIncludes(includes);
              modelTask.addFileset(files);
              modelTask.execute();
  
              _creationScript = readTextCompressed(scriptFile);
  
              deleteDir(tmpDir);
          }
          catch (Exception ex)
          {
              // clean-up
              if ((tmpDir != null) && tmpDir.exists())
              {
                  deleteDir(tmpDir);
              }
              throw new PlatformException(ex);
          }
      }
docs: Creates the db-creation sql script (but does not perform it).
  
  @throws PlatformException If some error occurred