You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by "Tomislav Nakic-Alfirevic (JIRA)" <ji...@apache.org> on 2009/05/31 18:10:07 UTC

[jira] Created: (DDLUTILS-249) make it possible to ignore foreign keys

make it possible to ignore foreign keys
---------------------------------------

                 Key: DDLUTILS-249
                 URL: https://issues.apache.org/jira/browse/DDLUTILS-249
             Project: DdlUtils
          Issue Type: Improvement
          Components: Core (No specific database)
         Environment: Ubuntu 9.04
            Reporter: Tomislav Nakic-Alfirevic
            Assignee: Thomas Dudziak
            Priority: Minor


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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.