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] Updated: (DDLUTILS-104) "empty" DEFAULT statements
Date Thu, 13 Jul 2006 07:19:31 GMT
     [ http://issues.apache.org/jira/browse/DDLUTILS-104?page=all ]

Thomas Dudziak updated DDLUTILS-104:
------------------------------------

    Component: Core (No specific database)

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

>   Components: Core (No specific database)
>     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