[ http://issues.apache.org/jira/browse/DDLUTILS-122?page=comments#action_12428569 ] Thomas Dudziak commented on DDLUTILS-122: -----------------------------------------
I'm not sure what you mean ? The attached SQL script includes plenty of foreign keys (47 to be precise) at the end of the file, which are of the form: ALTER TABLE <localTableName> ADD CONSTRAINT <foreignKeyName> FOREIGN KEY (<localColumns>) REFERENCES <remoteTableName> (<remoteColumns>); > Foreign keys not generated in SQL > --------------------------------- > > Key: DDLUTILS-122 > URL: http://issues.apache.org/jira/browse/DDLUTILS-122 > Project: DdlUtils > Issue Type: Bug > Components: Core - DB2 > Affects Versions: 1.0 > Reporter: Mike Perham > Assigned To: Thomas Dudziak > Priority: Critical > Attachments: fabric-schema.sql, fabric-schema.xml > > > I'm using writeSchemaSqlToFile to generate the SQL from my schema file: > {code:xml} > <target name="schema-to-sql"> > <taskdef name="ddl2Database" > classname="org.apache.ddlutils.task.DdlToDatabaseTask" > classpathref="runtime-classpath"/> > <ddl2Database databaseType="db2" schemaFile="fabric-schema.xml"> > <writeSchemaSqlToFile alterDatabase="false" doDrops="false" > failOnError="true" outputFile="fabric-schema.sql" /> > </ddl2Database> > </target> > {code} > See attached schema xml and sql. The schema was generated from mysql 5.0.19 > using the 5.0.3 JDBC driver. The SQL is being generated for DB2. Note that > the schema includes plenty of foreign key references but the generated SQL > includes none of them. This is a blocker for us to use DdlUtils. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira