Revision: 5957
http://squirrel-sql.svn.sourceforge.net/squirrel-sql/?rev=5957&view=rev
Author: manningr
Date: 2010-11-06 20:47:51 +0000 (Sat, 06 Nov 2010)
Log Message:
-----------
Removed the child column index creation when creating a FK. Informix does this automatically when a FK is created.
Modified Paths:
--------------
trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/dialects/InformixDialectExt.java
Modified: trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/dialects/InformixDialectExt.java
===================================================================
--- trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/dialects/InformixDialectExt.java 2010-11-06 20:28:32 UTC (rev 5956)
+++ trunk/sql12/fw/src/main/java/net/sourceforge/squirrel_sql/fw/dialects/InformixDialectExt.java 2010-11-06 20:47:51 UTC (rev 5957)
@@ -534,33 +534,13 @@
boolean autoFKIndex, String fkIndexName, Collection<String[]> localRefColumns, String onUpdateAction,
String onDeleteAction, DatabaseObjectQualifier qualifier, SqlGenerationPreferences prefs)
{
+
+ // This method no longer creates an index for the child column. Informix does this automatically
+ // when the FK constraint is created.
+
prefs.setQuoteColumnNames(false);
prefs.setQuoteConstraintNames(false);
- // We only want the index sql which is the second statement in the array. Informix requires the
- // constraint stuck onto the end of the statement.
- String[] utilSql =
- DialectUtils.getAddForeignKeyConstraintSQL(localTableName,
- refTableName,
- constraintName,
- deferrable,
- initiallyDeferred,
- matchFull,
- autoFKIndex,
- fkIndexName,
- localRefColumns,
- onUpdateAction,
- onDeleteAction,
- qualifier,
- prefs,
- this);
-
- String indexSql = null;
- if (utilSql.length == 2)
- {
- indexSql = utilSql[1];
- }
-
/**
* ALTER TABLE fkTestChildTable ADD CONSTRAINT FOREIGN KEY (fkchildid) REFERENCES fkTestParentTable
* (parentid) constraint fk_const_name
@@ -595,17 +575,9 @@
result.append(" CONSTRAINT ");
result.append(constraintName);
+
- String[] retVal = null;
- if (indexSql != null)
- {
- retVal = new String[] { result.toString(), indexSql };
- } else
- {
- retVal = new String[] { result.toString() };
- }
-
- return retVal;
+ return new String[] { result.toString() };
}
public String[] getAddUniqueConstraintSQL(String tableName, String constraintName,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|