You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@continuum.apache.org by "Brett Porter (JIRA)" <ji...@codehaus.org> on 2009/05/28 05:54:42 UTC

[jira] Commented: (CONTINUUM-2147) Schema generated is incorrect when jpox.null-value="default" is set in sendOnScmFailure field

    [ http://jira.codehaus.org/browse/CONTINUUM-2147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=178330#action_178330 ] 

Brett Porter commented on CONTINUUM-2147:
-----------------------------------------

note that some additional changes were made in r766106 to improve upgradeability on both databases

> Schema generated is incorrect when jpox.null-value="default" is set in sendOnScmFailure field
> ---------------------------------------------------------------------------------------------
>
>                 Key: CONTINUUM-2147
>                 URL: http://jira.codehaus.org/browse/CONTINUUM-2147
>             Project: Continuum
>          Issue Type: Bug
>          Components: Database
>    Affects Versions: 1.3.2
>            Reporter: Maria Catherine Tan
>            Assignee: Maria Catherine Tan
>             Fix For: 1.3.3
>
>
> jpox.null-value="default" in a boolean field causes:
> 1.) With MySQL, you won't be able to create and upgrade your database from Continuum 1.2.x to 1.3.x
> ERROR JPOX.RDBMS  - Error thrown executing CREATE TABLE `PROJECTNOTIFIER`
> (
>     `ID` INTEGER NOT NULL,
>     `ENABLED` BIT NOT NULL,
>     `NOTIFIERORIGIN` INTEGER NOT NULL,
>     `MODEL_ENCODING` VARCHAR(255) BINARY NULL,
>     `RECIPIENT_TYPE` INTEGER NOT NULL,
>     `SEND_ON_ERROR` BIT NOT NULL,
>     `SEND_ON_FAILURE` BIT NOT NULL,
>     `SEND_ON_SCM_FAILURE` BIT NOT NULL DEFAULT 'false',
>     `SEND_ON_SUCCESS` BIT NOT NULL,
>     `SEND_ON_WARNING` BIT NOT NULL,
>     `NOTIFIERTYPE` VARCHAR(255) BINARY NULL,
>     PRIMARY KEY (`ID`)
> ) ENGINE=INNODB : Invalid default value for 'SEND_ON_SCM_FAILURE'
> com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Invalid default value for 'SEND_ON_SCM_FAILURE'
> 2.) With Derby, you'll be able to create your database but it fails when you try to upgrade from continuum 1.2.x to 1.3.x
> ERROR JPOX.RDBMS  - Error thrown executing ALTER TABLE PROJECTNOTIFIER ADD SEND_ON_SCM_FAILURE CHAR(1) DEFAULT 'false' CHECK (SEND_ON_SCM_FAILURE IN ('Y','N')) : A truncation error was encountered trying to shrink CHAR 'false' to length 1.
> ERROR 22001: A truncation error was encountered trying to shrink CHAR 'false' to length 1.

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