Schema Generator

The Signsoft intelliBO Schema Generator analyzes a Signsoft intelliBO project and creates files, that can be use to manage the table structure for the project within the given database.

Generated Files

The schema generator per default creates this three files:

Optional it also creates the following file:

Usage

There is an Ant Task (see also section "Apache Ant Tasks for Signsoft intelliBO Tools" of the user guides "First Steps" chapter) called ibo:schemagen to execute the verifier tool:

<target name="schemagen">
 <ibo:schemagen source="${business.classes.dir}" destination="${sql.dir}">
  <!-- for additional classpath settings use:
  <classpath ... />
  -->
  <ibo:dbconfig id="db.config"
                driverclassname="${database.driver.class}" 
                connectionurl="${database.url}" 
                user="${database.user}" 
                password="${database.password}" 
                databasesupportclass="${database.dbsupportname}" 
                databasesupportrules="${database.dbsupportrules}" />
 </ibo:schemagen>
</target>

OptionDescriptionrequired
sourceThe source directory, where the compiled classes and the JDO descriptors can be found.yes
destinationThe destination directory where the generated files will be copied to.no
create[:true|no]
(default:true)
The script for creating the database structure should be created.no
drop[:true|no]
(default:true)
The script for deleting the database structure should be created.no
select[:true|no]
(default:true)
The script for displaying the database contents should be created.no
update[:true|no]
(default:false)
The script for synchronizing the database structure with the mapping information should be created.no
safeupdateonly[:true|false]
(default: true)
If this value is true, only non-destructive parts of the update script should be created. This means especially, that SQL statements for the following tasks are not created: removing tables, removing fields, change the data type of fields.no
testdb[:true|false]
(default: true)
Turns the database testing on or off. With this option activated e.g. the maximum lengths of generated tables and fields are checked.no
case[:upper|lower|default]
(default:default)
Switch all generated table and field names to upper or lower case. Per default, the names are not changed. This may solve some problems if the mappings contains mixed forms of table names and field names (e.g. because the schema was extracted from the database metadata, but was changed manually afterwards).no
dbconfigrefSpecifies a database configuration using a reference. You specify the database configuration (necessary for enabled database testing) using the ibo:dbconfig Ant type as desribed in section "Signsoft intelliBO Ant Types". The id of an already defined ibo:dbconfig can be used as such a reference.yes
classpathrefSpecifies an additional classpath using a reference on a already defined classpath.no

To specify an additional classpath for the tool, please use the classpathRef attribute or a classpath tag as shown above.