db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject svn commit: r365987 - /db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/mysql/MySqlBuilder.java
Date Wed, 04 Jan 2006 21:06:44 GMT
Author: tomdz
Date: Wed Jan  4 13:06:40 2006
New Revision: 365987

URL: http://svn.apache.org/viewcvs?rev=365987&view=rev
Log:
Changed foreign key drop statement so that it uses the same name generation as the create
statement

Modified:
    db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/mysql/MySqlBuilder.java

Modified: db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/mysql/MySqlBuilder.java
URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/mysql/MySqlBuilder.java?rev=365987&r1=365986&r2=365987&view=diff
==============================================================================
--- db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/mysql/MySqlBuilder.java (original)
+++ db/ddlutils/trunk/src/java/org/apache/ddlutils/platform/mysql/MySqlBuilder.java Wed Jan
 4 13:06:40 2006
@@ -112,18 +112,13 @@
     }
 
     /**
-     * @see org.apache.ddlutils.platform.SqlBuilder#writeExternalForeignKeyDropStmt(org.apache.ddlutils.model.Table,
org.apache.ddlutils.model.ForeignKey)
+     * {@inheritDoc}
      */
     protected void writeExternalForeignKeyDropStmt(Table table, ForeignKey foreignKey) throws
IOException
     {
         writeTableAlterStmt(table);
         print("DROP FOREIGN KEY ");
-        String foreignKeyName = foreignKey.getName();
-        if (foreignKeyName == null)
-        {
-            foreignKeyName = getConstraintName(null, table, "FK", getForeignKeyName(table,
foreignKey));
-        }
-        printIdentifier(foreignKeyName);
+        printIdentifier(getForeignKeyName(table, foreignKey));
         printEndOfStatement();
     }    
 



Mime
View raw message