Continuum
  1. Continuum
  2. CONTINUUM-2147

Schema generated is incorrect when jpox.null-value="default" is set in sendOnScmFailure field

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.2 (Beta)
    • Fix Version/s: 1.3.3 (Beta)
    • Component/s: Database
    • Labels:
      None

      Description

      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.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        3m 1s 1 Maria Catherine Tan 23/Mar/09 19:24
        Mark Thomas made changes -
        Workflow jira [ 12948503 ] Default workflow, editable Closed status [ 12985726 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 21:12:18 UTC 2015 [ 1428268338676 ]
        Mark Thomas made changes -
        Workflow jira [ 12710799 ] Default workflow, editable Closed status [ 12740446 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 08:36:01 UTC 2015 [ 1428222961749 ]
        Hide
        Brett Porter added a comment -

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

        Show
        Brett Porter added a comment - note that some additional changes were made in r766106 to improve upgradeability on both databases
        Maria Catherine Tan made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 1.3.3 [ 15105 ]
        Hide
        Maria Catherine Tan added a comment -

        Removed jpox.null-value="default" in sendOnScmFailure field - revision 757136

        Show
        Maria Catherine Tan added a comment - Removed jpox.null-value="default" in sendOnScmFailure field - revision 757136
        Maria Catherine Tan made changes -
        Field Original Value New Value
        Assignee Maria Catherine Tan [ ctan ]
        Maria Catherine Tan created issue -

          People

          • Assignee:
            Maria Catherine Tan
            Reporter:
            Maria Catherine Tan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development