Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0041366Openbravo ERPY. DBSourceManagerpublic2019-07-16 13:292019-08-22 14:45
adrianromero 
alostale 
normalmajorhave not tried
closedfixed 
5
 
3.0PR19Q4 
caristu
Core
No
0041366: Check constraints values when exported values are transformed to upper case
When exporting check constraints with values that contains lower case values. These values are transformed to upper case. These is wrong, values must not be modified.
Create the following check constraint in PostgreSQL:

ALTER TABLE public.obpos_paymentgroup
  ADD CONSTRAINT em_ady_configuration_chk CHECK (provider::text <> 'ADY_AdyenProvider'::text OR em_ady_apikey IS NOT NULL AND em_ady_network IS NOT NULL);

Export using the build command ant export.database
Observe the SQL exported is

PROVIDER <> 'ADY_ADYENPROVIDER' OR EM_ADY_APIKEY IS NOT NULL AND EM_ADY_NETWORK IS NOT NULL

No tags attached.
related to defect 0041367 closed adrianromero Retail Modules Sumup payment provider name must be upper case 
Issue History
2019-07-16 13:29adrianromeroNew Issue
2019-07-16 13:29adrianromeroAssigned To => platform
2019-07-16 13:29adrianromeroModules => Core
2019-07-16 13:29adrianromeroTriggers an Emergency Pack => No
2019-07-16 13:48adrianromeroRelationship addedrelated to 0041367
2019-07-30 15:49alostaleAssigned Toplatform => alostale
2019-07-31 13:20hgbotCheckin
2019-07-31 13:20hgbotNote Added: 0113735
2019-07-31 13:20hgbotStatusnew => resolved
2019-07-31 13:20hgbotResolutionopen => fixed
2019-07-31 13:20hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/58004f8efa540f17758f4148ea71120eb5e62573 [^]
2019-07-31 13:21hgbotCheckin
2019-07-31 13:21hgbotNote Added: 0113738
2019-07-31 13:21hgbotCheckin
2019-07-31 13:21hgbotNote Added: 0113739
2019-07-31 13:21hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/58004f8efa540f17758f4148ea71120eb5e62573 [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/3517bb63edf9d6b4cbecf841c7c889d6225ee1ad [^]
2019-07-31 13:21alostaleReview Assigned To => caristu
2019-07-31 13:21alostaleFixed in SCM revisionhttp://code.openbravo.com/erp/devel/dbsm-main/rev/3517bb63edf9d6b4cbecf841c7c889d6225ee1ad [^] => http://code.openbravo.com/erp/devel/pi/rev/58004f8efa540f17758f4148ea71120eb5e62573 [^]
2019-08-02 08:59hgbotCheckin
2019-08-02 08:59hgbotNote Added: 0113772
2019-08-02 08:59caristuNote Added: 0113773
2019-08-02 08:59caristuStatusresolved => closed
2019-08-02 08:59caristuFixed in Version => 3.0PR19Q4
2019-08-22 14:45hudsonbotCheckin
2019-08-22 14:45hudsonbotNote Added: 0114189
2019-08-22 14:45hudsonbotCheckin
2019-08-22 14:45hudsonbotNote Added: 0114191

Notes
(0113735)
hgbot   
2019-07-31 13:20   
Repository: erp/devel/pi
Changeset: 58004f8efa540f17758f4148ea71120eb5e62573
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed Jul 31 13:20:31 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/58004f8efa540f17758f4148ea71120eb5e62573 [^]

fixed bug 41460 fixed bug 41366: allow multi col checks, don't upper case check

fixed issue 41460: multi colum FKs are not supported in PG

  The query to obtain columns participating in FKs was incorrect in PG as it
  assumed FKs have a single column.

  As PG catalog stores FK column information as a couple of arrays (one for local
  and another one for external column) each of them corresponding each other by
  array's position, it is not possible to retrieve all information using a single
  query. This has been changed so now column information is retrieved by an additional
  query based on array's position.


fixed issue 41366: string literals in check contrains are upper cased

  When exporting check constraints in PostgreSQL, they are converted to upper case
  in order to keep ORA - PG stability. This conversion was to aggressive as string
  literals were also modified.

  Now strings are kept while the rest is still transformed.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0113738)
hgbot   
2019-07-31 13:21   
Repository: erp/devel/dbsm-main
Changeset: ea1fbde18d1a250ad6919c46edf189ea89625827
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jul 30 15:46:31 2019 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/ea1fbde18d1a250ad6919c46edf189ea89625827 [^]

related to issue 41366: added test case

---
M src-test/src/org/openbravo/dbsm/test/model/ModelSuite.java
A src-test/model/constraints/CHK_LOWER_CASE.xml
A src-test/src/org/openbravo/dbsm/test/model/CheckConstraintLowerCase.java
---
(0113739)
hgbot   
2019-07-31 13:21   
Repository: erp/devel/dbsm-main
Changeset: 3517bb63edf9d6b4cbecf841c7c889d6225ee1ad
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jul 30 15:52:12 2019 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/3517bb63edf9d6b4cbecf841c7c889d6225ee1ad [^]

fixed issue 41366: string literals in check contrains are upper cased

  When exporting check constraints in PostgreSQL, they are converted to upper case
  in order to keep ORA - PG stability. This conversion was to aggressive as string
  literals were also modified.

  Now strings are kept while the rest is still transformed.

---
M src/org/apache/ddlutils/model/Check.java
M src/org/apache/ddlutils/platform/postgresql/PostgreSqlCheckTranslation.java
---
(0113772)
hgbot   
2019-08-02 08:59   
Repository: erp/devel/dbsm-main
Changeset: fa6eab212c328619e565e2b155585df14693ef64
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Aug 02 08:59:11 2019 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/fa6eab212c328619e565e2b155585df14693ef64 [^]

related to issue 41366: update copyright year

---
M src/org/apache/ddlutils/platform/postgresql/PostgreSqlCheckTranslation.java
---
(0113773)
caristu   
2019-08-02 08:59   
Reviewed + tested OK
(0114189)
hudsonbot   
2019-08-22 14:45   
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/ad3efd3bd07c [^]
Maturity status: Test
(0114191)
hudsonbot   
2019-08-22 14:45   
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/ad3efd3bd07c [^]
Maturity status: Test