## writeSchemaSqlToFile

Description

Java type: `org.apache.ddlutils.task.WriteSchemaSqlToFileCommand`

Parses the schema XML files specified in the enclosing task, and writes the SQL statements necessary to create this schema in the database, to a file. Note that this SQL is database specific and hence this subtask requires that for the enclosing task, either a data source is specified (via the `database` sub element) or the `databaseType` attribute is used to specify the database type.

Parameters

outputfile : File (required)

Specifies the name of the file to write the SQL commands to.

dodrops : boolean

Specifies whether SQL for dropping tables, external constraints, etc. is created if necessary. Note that this is only relevant when `alterDatabase` is `false`.
Per default, drop SQL statements are created

failonerror : boolean

Specifies whether the execution shall stop if an error has occurred during the task runs.
By default execution will be stopped when an error is encountered.

alterdatabase : boolean

Specifies whether DdlUtils shall generate SQL to alter an existing database rather than SQL for clearing it and creating it new.
Per default SQL for altering the database is created

Nested elements

⇒ `parameter`

©2005-2007 Apache Software Foundation