Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0034048 | Openbravo ERP | A. Platform | public | 2016-09-21 16:31 | 2016-09-23 09:34 | |||||||
Reporter | caristu | |||||||||||
Assigned To | platform | |||||||||||
Priority | high | Severity | major | Reproducibility | always | |||||||
Status | closed | Resolution | invalid | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | |||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | ||||||||||||
OBNetwork customer | No | |||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0034048: Not null constraint removed from database under some circumnstances | |||||||||||
Description | A not null constraint defined for a column of an AD table disappears when AD XML files are older than new column definition, if that column does not have an oncreatedefault. | |||||||||||
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 [^] | |||||||||||
Proposed Solution | ||||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ![]() https://issues.openbravo.com/file_download.php?file_id=9845&type=bug | |||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2016-09-21 16:31 | caristu | New Issue | ||||||||||
2016-09-21 16:31 | caristu | Assigned To | => platform | |||||||||
2016-09-21 16:31 | caristu | OBNetwork customer | => No | |||||||||
2016-09-21 16:31 | caristu | Modules | => Core | |||||||||
2016-09-21 16:31 | caristu | Triggers an Emergency Pack | => No | |||||||||
2016-09-21 16:31 | caristu | File Added: testColumn.diff | ||||||||||
2016-09-21 16:33 | caristu | Relationship added | related to 0029270 | |||||||||
2016-09-21 16:34 | caristu | Description Updated | bug_revision_view_page.php?rev_id=13147#r13147 | |||||||||
2016-09-21 16:45 | caristu | Proposed Solution updated | ||||||||||
2016-09-21 16:55 | caristu | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=13149#r13149 | |||||||||
2016-09-21 16:55 | caristu | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=13150#r13150 | |||||||||
2016-09-21 16:59 | caristu | Description Updated | bug_revision_view_page.php?rev_id=13151#r13151 | |||||||||
2016-09-21 17:32 | caristu | File Deleted: testColumn.diff | ||||||||||
2016-09-21 17:32 | caristu | File Added: testColumn.diff | ||||||||||
2016-09-23 09:34 | alostale | Note Added: 0090185 | ||||||||||
2016-09-23 09:34 | alostale | Status | new => closed | |||||||||
2016-09-23 09:34 | alostale | Resolution | open => invalid |
Notes | |||||
|
|||||
|
|