db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dudziak (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DDLUTILS-104) "empty" DEFAULT statements
Date Fri, 12 May 2006 20:48:45 GMT
    [ http://issues.apache.org/jira/browse/DDLUTILS-104?page=comments#action_12383275 ] 

Thomas Dudziak commented on DDLUTILS-104:
-----------------------------------------

I've committed a fix for this. Please try it out and let me know whether it works.

> "empty" DEFAULT statements
> --------------------------
>
>          Key: DDLUTILS-104
>          URL: http://issues.apache.org/jira/browse/DDLUTILS-104
>      Project: DdlUtils
>         Type: Bug

>     Reporter: Ueli Kurmann
>     Assignee: 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