Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040119Openbravo ERP07. Sales managementpublic2019-02-04 13:052019-03-28 14:56
vmromanos 
AtulOpenbravo 
urgentmajoralways
closedfixed 
5
 
3.0PR19Q2 
Sandrahuguet
Core
No
0040119: Set two new columns in C_Invoice as nullable and do not set a default value
In Create Lines From Refactor introduced in 18Q4, two new columns were added to C_Invoice table: CREATEFROMORDERS and CREATEFROMINOUTS.

They were set as mandatory and default value 'N'.

In versions before PG 11 this configuration adds an important overhead when creating the columns. So to avoid a performance issue in the update process, it would be better to set both columns as nullable and without a default value.

Basically is to revert the changeset: https://code.openbravo.com/erp/devel/pi/rev/7d6426933ab5 [^]
In a HV table, like c_order, run:
ALTER TABLE c_order add COLUMN test character varying(1) default 'N';
Check it's very slow.

Now run:
ALTER TABLE c_order add COLUMN test2 character varying(1);
It's almost immediate.

Performance
depends on backport 00401293.0PR19Q1 closed AtulOpenbravo Set two new columns in C_Invoice as nullable and do not set a default value 
depends on backport 00401303.0PR18Q4.2 closed AtulOpenbravo Set two new columns in C_Invoice as nullable and do not set a default value 
depends on backport 00401313.0PR18Q3.5 closed AtulOpenbravo Set two new columns in C_Invoice as nullable and do not set a default value 
depends on defect 0040167 closed AtulOpenbravo API Change - Modify CREATEFROMORDERS, CREATEFROMINOUTS columns configuration in C_Invoice 
Issue History
2019-02-04 13:05vmromanosNew Issue
2019-02-04 13:05vmromanosAssigned To => Triage Finance
2019-02-04 13:05vmromanosModules => Core
2019-02-04 13:05vmromanosTriggers an Emergency Pack => No
2019-02-04 13:06vmromanosTag Attached: Performance
2019-02-04 13:08SandrahuguetAssigned ToTriage Finance => AtulOpenbravo
2019-02-04 20:10AtulOpenbravoStatusnew => scheduled
2019-02-06 18:14AtulOpenbravoRelationship addeddepends on 0040167
2019-02-11 08:50guillermogilResolution time => 1551049200
2019-02-12 13:31hgbotCheckin
2019-02-12 13:31hgbotNote Added: 0109723
2019-02-12 13:31hgbotStatusscheduled => resolved
2019-02-12 13:31hgbotResolutionopen => fixed
2019-02-12 13:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/018aa4e830903012d8560d5b12dd3288d5c5a994 [^]
2019-02-12 15:27SandrahuguetReview Assigned To => Sandrahuguet
2019-02-12 15:27SandrahuguetNote Added: 0109735
2019-02-12 15:27SandrahuguetStatusresolved => closed
2019-02-12 15:27SandrahuguetFixed in Version => 3.0PR19Q2
2019-03-28 14:56hudsonbotCheckin
2019-03-28 14:56hudsonbotNote Added: 0110808

Notes
(0109723)
hgbot   
2019-02-12 13:31   
Repository: erp/devel/pi
Changeset: 018aa4e830903012d8560d5b12dd3288d5c5a994
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Tue Feb 12 01:28:47 2019 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/018aa4e830903012d8560d5b12dd3288d5c5a994 [^]

Fixes Issue 40119:Set two new columns in C_Invoice as nullable and do not
set a default value

** Remove NOT NULL constraint for columns CREATEFROMORDERS, CREATEFROMINOUTS
** Avoid setting DEFAULT value N for above columns.
** Remove check constraint either Y or N for above columns.

---
M src-db/database/model/tables/C_INVOICE.xml
M src-db/database/sourcedata/AD_COLUMN.xml
---
(0109735)
Sandrahuguet   
2019-02-12 15:27   
code review + testing ok
(0110808)
hudsonbot   
2019-03-28 14:56   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/b2fbc1588df4 [^]
Maturity status: Test