On 4/13/06, Philip Mark Donaghy <[EMAIL PROTECTED]> wrote:

> OK I'm starting to understand. With alterDatabase true it will alter
> existing schema given that it has a connection. But correct me if I am
> wrong, when there is no connection and the objective is to obtain a
> ddl creation script for a given database using writeSchemaSqlToFile,
> the alterDatabase false is required. You explained this to me at
> ApacheCon San Diego but it's still unclear.
>
> writeSchemaSqlToFile should just test if a connection has been
> established ignore alterDatabase attribute and write the file. Is this
> possible? There may be some logic that I am missing but I only use
> ddlutils for this purpose. I think I will do some more work with it in
> the future for dumping data.

Well, I could add something that uses the failOnError attribute to
this purpose (or a similar new one defined): if no connection was
found and failOnError=true, then an error is reported and the task
stops. If failOnError=false, then an empty database would be assumed
(which is the same effect as alterDatabase=false). Could you add an
issue to JIRA for this ?

Tom

Reply via email to