db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ueli Kurmann (JIRA)" <j...@apache.org>
Subject [jira] Created: (DDLUTILS-104) "empty" default statements are generated
Date Mon, 08 May 2006 11:03:20 GMT
"empty" default statements are generated
----------------------------------------

         Key: DDLUTILS-104
         URL: http://issues.apache.org/jira/browse/DDLUTILS-104
     Project: DdlUtils
        Type: Bug

    Reporter: Ueli Kurmann
 Assigned to: Thomas Dudziak 


i tried to extract the db schema out of a mysql database and transformed it to derby. this
task fails because a lot of empty DEFAULT statements are genereatet. 

Example:
sql output: ID INTEGER DEFAULT  NOT NULL
xml:  <column name="ID" primaryKey="true" required="true" type="INTEGER" size="11" autoIncrement="false"/>

Perhaps the problem can be fixed with an additional test in the org.apache.ddlutils.platform.SqlBuilder
class, method writeColumn(..).

original:
 if ((column.getDefaultValue() != null) ||
            (getPlatformInfo().isDefaultValueUsedForIdentitySpec() && column.isAutoIncrement()))

possible fix:
 if (((column.getDefaultValue() != null)  &&  column.getDefaultValue().trim().length()>0)||
            (getPlatformInfo().isDefaultValueUsedForIdentitySpec() && column.isAutoIncrement()))




    

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message