Uploaded image for project: 'DdlUtils'
  1. DdlUtils
  2. DDLUTILS-122

Foreign keys not generated in SQL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Invalid
    • 1.0
    • None
    • Core - DB2
    • None

    Description

      I'm using writeSchemaSqlToFile to generate the SQL from my schema file:

      <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>
      

      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.

      Attachments

        Activity

          People

            tomdz Thomas Dudziak
            mperham Mike Perham
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: