Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Invalid
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Component/s: Core - DB2
    • Labels:
      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.

        Activity

        Hide
        Thomas Dudziak added a comment -

        No need to feel idiotic, we all make such mistakes Though you might bring things like this up on the user mailing list first where it is likely to get you faster responses.

        Show
        Thomas Dudziak added a comment - No need to feel idiotic, we all make such mistakes Though you might bring things like this up on the user mailing list first where it is likely to get you faster responses.
        Hide
        Mike Perham added a comment -

        Wow, I feel idiotic. Ok, you put them at the end so you don't have to worry about ordering. You can close this.

        Show
        Mike Perham added a comment - Wow, I feel idiotic. Ok, you put them at the end so you don't have to worry about ordering. You can close this.
        Hide
        Thomas Dudziak added a comment -

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

        Show
        Thomas Dudziak added a comment - 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>);

          People

          • Assignee:
            Thomas Dudziak
            Reporter:
            Mike Perham
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development