David Sean Taylor wrote:
Ate Douma wrote:

Ate Douma wrote:

So, I'd like to call a vote on the following proposals:
- maintain our own torque-sql scripts:


    [X]

- provide our own data xml to sql (torque based) scripts:


    [X]

- (re)write our own database config engine based on torque allowing runtime schema/data installation/upgrade:


   [X]


I think we should take up Henning's offer and try to get the scripts working with the help of the Torque team.
I just send him a reply with a detailed list of our problems and asked
if these can be addressed by Torque or maybe we should search for a different
solution (like commons-sql).


Just to recap, here are some of the issues Im aware of are:

1. FK dependency order. The scripts need to be generated in an order such that FK dependencies are resolved and that the dependent tables are deleted before the referenced tables, and the referenced tables are created before the referencing tables. The way Torque currently generates scripts, this seems to be a catch-22:

if TABLE exists drop it
create table

One solution is  to do the drops and creates in two separate scripts

2. The Oracle scripts do not generate "IF TABLE EXISTS DROP" requiring a special case for Oracle.
This issue is fixed in the latest release of torque 3.1.1 (we are using the
somewhat odd numbered older 3.2 version).
I already tried it and it does work except that then we need to override the
statement termination character (default ';') because the solution for Oracle
requires (for these scripts only) to use '/' as terminator.


3. We require hand-coded data population scripts specific to each database that vary slightly. AFAIK, Torque only deals with DDL and not data manipulation i.e. INSERT statements.
Well, the generator has a TorqueDataSQLTask which is meant for generating
INSERT statements, but its current features are somewhat thin...




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to