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

make it possible to ignore foreign keys

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • Ubuntu 9.04

    Description

      I use ddlutils for warehouse-related tasks and so don't need all the foreign key support. However, foreign keys in some databases I worked with prevented my ddlutils ant scripts to break. I performed the following quick fix:
      Index: main/java/org/apache/ddlutils/platform/SqlBuilder.java
      ===================================================================
      — main/java/org/apache/ddlutils/platform/SqlBuilder.java (revision 753277)
      +++ main/java/org/apache/ddlutils/platform/SqlBuilder.java (working copy)
      @@ -696,7 +696,7 @@

      { _log.warn("Foreign key table is null for key " + foreignKey); }
      • else
        + else if (false) // we don't want foreign keys
        {
        writeTableAlterStmt(table);

      I understand that this is unacceptable as a general solution, but maybe a parameter could be introduced to choose if the "else" clause will be called or not, something like "ignoreForeignKeys=yes|no"?

      Attachments

        Activity

          People

            tomdz Thomas Dudziak
            tna Tomislav Nakic-Alfirevic
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: