David Sean Taylor wrote:
I think we should take up Henning's offer and try to get the scripts
working with the help of the Torque team.
+1
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
Another solution is to first drop the constraints.
The following statements order should always work whatever the ordering:
For all FK.
- ALTER ... DROP CONSTRAINT FK
For all tables
- DROP TABLE
For all tables
- CREATE TABLE
For all FKs
- ALTER ... ADD CONSTRAINT FK
I guess Torque should be easily able to implement a script this way.
2. The Oracle scripts do not generate "IF TABLE EXISTS DROP" requiring
a special case for Oracle.
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.
This could possibly be bypassed by using the Java object API to populate
the tables instead of straight SQL.
--
Raphaël Luta - [EMAIL PROTECTED]
Apache Portals - Enterprise Portal in Java
http://portals.apache.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]