Hi all,

I was hoping you would be able to answer a few of my questions about DDLUtils. Some are questions about DDLUtils functionality; if DDLUtils can't do the request currently I'd like to hear if you think it could or whether it should. I'd like to contribute (coding, testing, docs) to new features deemed useful and possible by the group.

1) The XML file of data dumped from DatabaseToDdl using writeDataToFile now loads without a DOCTYPE declaration being added when I use validateXml="false" in my DdlToDatabase tag. (Thanks Thomas!) However, the root tag of the the dump (from Oracle 10g EE) is just <database>. When I load, I get an error saying I need a 'name' attribute on the root tag. If I manually add it giving: <database name='SomeName'> then my load works fine. Is there any way to have the name added to the file automatically? If so, what is the setting?

2) I am unable to get the ON DELETE CASCADE behavior of foreign keys to be recorded when dumping schema to XML. I have verified that my Oracle table has a foreign key with Delete Rule set to Cascade, but a schema dump does not add `onDelete="cascade"` to the <foreign key> tag in the schema.xml. I can add this attribute to the schema file manually, but a load (DdlToDatabase) seems to silently ignore them when creating tables. Any ideas?

3) I'd like to add a db.clean target to my Ant build file that drops all everything (tables, etc) leaving an empty database. Is there anything in DDLUtils that can do this for the different database types?

4) Is there any way to essentially diff two schema XML files and generate database-specific SQL that can be saved to a file? Ideally, I'd like to use for handling database upgrades of our product. This seems to be almost what the WriteSchemaToDatabase command is doing for a single schema and a live database with alterDatabase=true. Would it be possible to replace the live database with a second schema and then have the SQL sent to a file rather than to the live database?

5) Similarly to #4, but diffing two sets of data that has been dumped to XML and generating database specific SQL. Is this even possible for all the different ways to change data? This seems much harder than #4.

Thanks in advance,
Guy

Reply via email to