Project:
View Revisions: Issue #34048 | [ All Revisions ] [ Back to Issue ] | ||
Summary | 0034048: Not null constraint removed from database under some circumnstances | ||
Revision | 2016-09-21 16:55 by caristu | ||
Steps To Reproduce | 1) Install the attached patch which adds a new test column to the OBUIAPP_Report table (this is an AD table) 2) Install the following module: https://code.openbravo.com/erp/mods/org.openbravo.platform.features/ [^] this module contains some sourcedata for the OBUIAPP_Report table which obviously does not define any value for the test column 3) Notice that after the execution of the update.database task, the NOT NULL constraint is gone for the test column in the database. In addition, the following error is displayed: [java] 38957 INFO - Batch statement failed. Rolling back and retrying all the statements in a non-batched connection. [java] 46518 WARN - SQL Command failed with: ERROR: column "test" contains null values [java] 46528 WARN - -- END [java] ALTER TABLE OBUIAPP_REPORT ALTER TEST SET NOT NULL [java] 48633 INFO - Executed 886 SQL command(s) with 1 error(s) Note: this error can be workarounded by defining an onCreateDefault[1] for the column. [1] http://wiki.openbravo.com/wiki/How_to_define_an_on_Create_Default [^] |
||
Revision | 2016-09-21 16:55 by caristu | ||
Steps To Reproduce | 1) Install the attached patch which adds a new test column to the OBUIAPP_Report table (this is an AD table) 2) Install the following module: https://code.openbravo.com/erp/mods/org.openbravo.platform.features/ [^] this module contains some sourcedata for the OBUIAPP_Report table which obviously does not define any value for the test column 3) Notice that after the execution of the update.database task, the NOT NULL constraint is gone for the test column in the database. In addition, the following error is displayed: [java] 46518 WARN - SQL Command failed with: ERROR: column "test" contains null values [java] 46528 WARN - -- END [java] ALTER TABLE OBUIAPP_REPORT ALTER TEST SET NOT NULL Note: this error can be workarounded by defining an onCreateDefault[1] for the column. [1] http://wiki.openbravo.com/wiki/How_to_define_an_on_Create_Default [^] |
||
Revision | 2016-09-21 16:45 by caristu | ||
Steps To Reproduce | 1) Install the attached patch which adds a new test column to the OBUIAPP_Report table (this is an AD table) 2) Install the following module: https://code.openbravo.com/erp/mods/org.openbravo.platform.features/ [^] this module contains some sourcedata for the OBUIAPP_Report table which obviously does not define any value for the test column 3) Notice that after the execution of the update.database task, the NOT NULL constrain is gone for the test column in the database. Note: this error can be workarounded by defining an onCreateDefault[1] for the column. [1] http://wiki.openbravo.com/wiki/How_to_define_an_on_Create_Default [^] |
Copyright © 2000 - 2009 MantisBT Group |