details:   https://code.openbravo.com/erp/devel/pi/rev/12f4733ed955
changeset: 27288:12f4733ed955
user:      Asier Lostalé <asier.lostale <at> openbravo.com>
date:      Mon Aug 10 15:25:29 2015 +0200
summary:   fixed bug 30397: DB inconsistencies in PG9.5

  Fixes:
    * Changes in check constraint expressions, these expressions are now read
      from db using pg_get_constraintdef function
    * Changes in views

details:   https://code.openbravo.com/erp/devel/pi/rev/2f26f004b049
changeset: 27289:2f26f004b049
user:      Asier Lostalé <asier.lostale <at> openbravo.com>
date:      Mon Aug 10 15:26:33 2015 +0200
summary:   related to 30397: DB inconsistencies in PG9.5

  Formal changes in check constraint definition

diffstat:

 
modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_PARAMETER.xml
 |    2 +-
 
modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_REPORT.xml
    |    2 +-
 
modules/org.openbravo.client.myob/src-db/database/model/tables/OBKMO_WIDGET_CLASS.xml
       |    2 +-
 
modules/org.openbravo.client.querylist/src-db/database/model/tables/OBCQL_QUERY_COLUMN.xml
  |    2 +-
 
modules/org.openbravo.utility.cleanup.log/src-db/database/model/tables/OBULOG_CONFIG.xml
    |    2 +-
 src-db/database/lib/dbsourcemanager.jar                                        
             |    0 
 src-db/database/model/tables/AD_MODULE.xml                                     
             |    2 +-
 src-db/database/model/tables/AD_MODULE_INSTALL.xml                             
             |    2 +-
 src-db/database/model/tables/AD_ORG.xml                                        
             |    2 +-
 src-db/database/model/tables/AD_ORGINFO.xml                                    
             |    2 +-
 src-db/database/model/tables/AD_ORGTYPE.xml                                    
             |    2 +-
 src-db/database/model/tables/AD_ORG_ACCTSCHEMA.xml                             
             |    4 +-
 src-db/database/model/tables/AD_PREFERENCE.xml                                 
             |    2 +-
 src-db/database/model/tables/AD_PROCESS_REQUEST.xml                            
             |    4 +-
 src-db/database/model/tables/AD_TABLE.xml                                      
             |    8 ++--
 src-db/database/model/tables/AD_TABLE_NAVIGATION.xml                           
             |    2 +-
 src-db/database/model/tables/AD_WINDOW.xml                                     
             |    2 +-
 src-db/database/model/tables/C_BANK.xml                                        
             |    2 +-
 src-db/database/model/tables/C_BANKACCOUNT.xml                                 
             |   10 +++---
 src-db/database/model/tables/C_BANKSTATEMENTLINE.xml                           
             |    2 +-
 src-db/database/model/tables/C_BPARTNER.xml                                    
             |    6 +-
 src-db/database/model/tables/C_BP_BANKACCOUNT.xml                              
             |    8 ++--
 src-db/database/model/tables/C_CASHLINE.xml                                    
             |    4 +-
 src-db/database/model/tables/C_DEBT_PAYMENT.xml                                
             |   16 +++++-----
 src-db/database/model/tables/C_GLITEM.xml                                      
             |    6 +-
 src-db/database/model/tables/C_INVOICELINE.xml                                 
             |   12 +++---
 src-db/database/model/tables/C_ORDERLINE.xml                                   
             |    4 +-
 src-db/database/model/tables/C_TAX.xml                                         
             |    2 +-
 src-db/database/model/tables/FIN_FINACC_TRANSACTION.xml                        
             |    2 +-
 src-db/database/model/tables/FIN_FINANCIAL_ACCOUNT.xml                         
             |    8 ++--
 src-db/database/model/tables/FIN_FINANCIAL_ACCOUNT_ACCT.xml                    
             |    2 +-
 src-db/database/model/tables/FIN_PAYMENT.xml                                   
             |    2 +-
 src-db/database/model/tables/GL_JOURNAL.xml                                    
             |    2 +-
 src-db/database/model/tables/GL_JOURNALLINE.xml                                
             |    6 +-
 src-db/database/model/tables/MA_GLOBALUSE.xml                                  
             |    2 +-
 src-db/database/model/tables/MA_SEQUENCEPRODUCT.xml                            
             |    2 +-
 src-db/database/model/tables/MA_WRPHASEPRODUCT.xml                             
             |    2 +-
 src-db/database/model/tables/M_INOUT.xml                                       
             |    2 +-
 src-db/database/model/tables/M_INOUTLINE.xml                                   
             |    2 +-
 src-db/database/model/tables/M_INVENTORYLINE.xml                               
             |    2 +-
 src-db/database/model/tables/M_LC_RECEIPT.xml                                  
             |    2 +-
 src-db/database/model/tables/M_LC_TYPE.xml                                     
             |    2 +-
 src-db/database/model/tables/M_MOVEMENTLINE.xml                                
             |    2 +-
 src-db/database/model/tables/M_PRODUCT.xml                                     
             |   10 +++---
 src-db/database/model/tables/M_PRODUCTIONLINE.xml                              
             |    2 +-
 src-db/database/model/tables/M_RAPPEL_SCALE.xml                                
             |    2 +-
 src-db/database/model/tables/M_STORAGE_DETAIL.xml                              
             |    2 +-
 src-db/database/model/tables/M_STORAGE_PENDING.xml                             
             |    2 +-
 src-db/database/model/tables/M_TRANSACTION.xml                                 
             |    4 +-
 src-db/database/model/tables/S_TIMEEXPENSELINE.xml                             
             |    2 +-
 50 files changed, 89 insertions(+), 89 deletions(-)

diffs (truncated from 693 to 300 lines):

diff -r c3118a9e5203 -r 2f26f004b049 
modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_PARAMETER.xml
--- 
a/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_PARAMETER.xml
       Mon Aug 10 13:18:48 2015 +0200
+++ 
b/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_PARAMETER.xml
       Mon Aug 10 15:26:33 2015 +0200
@@ -178,6 +178,6 @@
       <check name="OBUIAPP_PARAMETER_ISFIXED_CHK"><![CDATA[ISFIXED IN ('Y', 
'N')]]></check>
       <check name="OBUIAPP_PARAMETER_MANDAT_CHK"><![CDATA[ISMANDATORY IN ('Y', 
'N')]]></check>
       <check name="OBUIAPP_PARAMETER_NEWLINE_CHK"><![CDATA[STARTINNEWLINE IN 
('Y', 'N')]]></check>
-      <check name="OBUIAPP_PARAMETER_NUMCOL_CHK"><![CDATA[(NUMCOLUMN >= 1) AND 
(NUMCOLUMN <= 4)]]></check>
+      <check name="OBUIAPP_PARAMETER_NUMCOL_CHK"><![CDATA[NUMCOLUMN >= 1 AND 
NUMCOLUMN <= 4]]></check>
     </table>
   </database>
diff -r c3118a9e5203 -r 2f26f004b049 
modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_REPORT.xml
--- 
a/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_REPORT.xml
  Mon Aug 10 13:18:48 2015 +0200
+++ 
b/modules/org.openbravo.client.application/src-db/database/model/tables/OBUIAPP_REPORT.xml
  Mon Aug 10 15:26:33 2015 +0200
@@ -63,6 +63,6 @@
       </unique>
       <check name="OBUIAPP_REPORT_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 
'N')]]></check>
       <check 
name="OBUIAPP_REPORT_PDF_AS_XLS_CHK"><![CDATA[USE_PDF_AS_XLS_TEMPLATE IN ('Y', 
'N')]]></check>
-      <check name="OBUIAPP_REPORT_TMP_CHK"><![CDATA[(PDF_TEMPLATE IS NOT NULL) 
OR (XLS_TEMPLATE IS NOT NULL)]]></check>
+      <check name="OBUIAPP_REPORT_TMP_CHK"><![CDATA[PDF_TEMPLATE IS NOT NULL 
OR XLS_TEMPLATE IS NOT NULL]]></check>
     </table>
   </database>
diff -r c3118a9e5203 -r 2f26f004b049 
modules/org.openbravo.client.myob/src-db/database/model/tables/OBKMO_WIDGET_CLASS.xml
--- 
a/modules/org.openbravo.client.myob/src-db/database/model/tables/OBKMO_WIDGET_CLASS.xml
     Mon Aug 10 13:18:48 2015 +0200
+++ 
b/modules/org.openbravo.client.myob/src-db/database/model/tables/OBKMO_WIDGET_CLASS.xml
     Mon Aug 10 15:26:33 2015 +0200
@@ -99,7 +99,7 @@
       </unique>
       <check 
name="OBKMO_WIDGETCLASS_ALLOWANONACC"><![CDATA[ALLOW_ANONYMOUS_ACCESS IN ('Y', 
'N')]]></check>
       <check name="OBKMO_WIDGETCLASS_CAN_MAX_CHK"><![CDATA[CAN_MAXIMIZE IN 
('Y', 'N')]]></check>
-      <check name="OBKMO_WIDGETCLASS_CLASNAME"><![CDATA[(WIDGET_SUPERCLASS_ID 
IS NOT NULL) OR (JAVACLASS IS NOT NULL)]]></check>
+      <check name="OBKMO_WIDGETCLASS_CLASNAME"><![CDATA[WIDGET_SUPERCLASS_ID 
IS NOT NULL OR JAVACLASS IS NOT NULL]]></check>
       <check name="OBKMO_WIDGETCLASS_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 
'N')]]></check>
       <check name="OBKMO_WIDGETCLASS_ISSUPERCLASS"><![CDATA[ISSUPERCLASS IN 
('Y', 'N')]]></check>
     </table>
diff -r c3118a9e5203 -r 2f26f004b049 
modules/org.openbravo.client.querylist/src-db/database/model/tables/OBCQL_QUERY_COLUMN.xml
--- 
a/modules/org.openbravo.client.querylist/src-db/database/model/tables/OBCQL_QUERY_COLUMN.xml
        Mon Aug 10 13:18:48 2015 +0200
+++ 
b/modules/org.openbravo.client.querylist/src-db/database/model/tables/OBCQL_QUERY_COLUMN.xml
        Mon Aug 10 15:26:33 2015 +0200
@@ -115,7 +115,7 @@
         <index-column name="OBCQL_WIDGET_QUERY_ID"/>
       </index>
       <check name="OBCQL_COLUMN_CANBEFILTERED_CHK"><![CDATA[CAN_BE_FILTERED IN 
('Y', 'N')]]></check>
-      <check name="OBCQL_COLUMN_WHERECLAUSE_CHK"><![CDATA[((CAN_BE_FILTERED = 
'Y') AND (WHERECLAUSE_LEFT_PART IS NOT NULL)) OR (CAN_BE_FILTERED = 
'N')]]></check>
+      <check name="OBCQL_COLUMN_WHERECLAUSE_CHK"><![CDATA[CAN_BE_FILTERED = 
'Y' AND WHERECLAUSE_LEFT_PART IS NOT NULL OR CAN_BE_FILTERED = 'N']]></check>
       <check name="OBCQL_QUERY_COLUMN_ACTIVECHK"><![CDATA[ISACTIVE IN ('Y', 
'N')]]></check>
       <check name="OBCQL_QUERY_COLUMN_HASLINK"><![CDATA[HAS_LINK IN ('Y', 
'N')]]></check>
     </table>
diff -r c3118a9e5203 -r 2f26f004b049 
modules/org.openbravo.utility.cleanup.log/src-db/database/model/tables/OBULOG_CONFIG.xml
--- 
a/modules/org.openbravo.utility.cleanup.log/src-db/database/model/tables/OBULOG_CONFIG.xml
  Mon Aug 10 13:18:48 2015 +0200
+++ 
b/modules/org.openbravo.utility.cleanup.log/src-db/database/model/tables/OBULOG_CONFIG.xml
  Mon Aug 10 15:26:33 2015 +0200
@@ -66,6 +66,6 @@
         <reference local="AD_TABLE_ID" foreign="AD_TABLE_ID"/>
       </foreign-key>
       <check name="OBULOG_CONFIG_ACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 
'N')]]></check>
-      <check name="OBULOG_CONFIG_STAT_CHECK"><![CDATA[(((AD_TABLE_ID) <> 
'49F3C31FA3F340A080D0C7F45ADB0216') AND ((AD_TABLE_ID) <> '566')) OR 
(OLDER_THAN > 30)]]></check>
+      <check name="OBULOG_CONFIG_STAT_CHECK"><![CDATA[AD_TABLE_ID <> 
'49F3C31FA3F340A080D0C7F45ADB0216' AND AD_TABLE_ID <> '566' OR OLDER_THAN > 
30]]></check>
     </table>
   </database>
diff -r c3118a9e5203 -r 2f26f004b049 src-db/database/lib/dbsourcemanager.jar
Binary file src-db/database/lib/dbsourcemanager.jar has changed
diff -r c3118a9e5203 -r 2f26f004b049 src-db/database/model/tables/AD_MODULE.xml
--- a/src-db/database/model/tables/AD_MODULE.xml        Mon Aug 10 13:18:48 
2015 +0200
+++ b/src-db/database/model/tables/AD_MODULE.xml        Mon Aug 10 15:26:33 
2015 +0200
@@ -181,7 +181,7 @@
       <check name="AD_MODULE_INDEVELOPMENT_CHK"><![CDATA[ISINDEVELOPMENT IN 
('Y', 'N')]]></check>
       <check name="AD_MODULE_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 
'N')]]></check>
       <check name="AD_MODULE_ISCOMMERCIAL_CHCK"><![CDATA[ISCOMMERCIAL IN ('Y', 
'N')]]></check>
-      <check name="AD_MODULE_ISDEFAULT_CHK"><![CDATA[(ISDEFAULT = 'N') OR 
((ISDEFAULT = 'Y') AND (ISINDEVELOPMENT = 'Y'))]]></check>
+      <check name="AD_MODULE_ISDEFAULT_CHK"><![CDATA[ISDEFAULT = 'N' OR 
ISDEFAULT = 'Y' AND ISINDEVELOPMENT = 'Y']]></check>
       <check name="AD_MODULE_ISREGISTERED_CHK"><![CDATA[ISREGISTERED IN ('Y', 
'N')]]></check>
       <check 
name="AD_MODULE_ISTRANSLATEABLE_CHK"><![CDATA[ISTRANSLATIONREQUIRED IN ('Y', 
'N')]]></check>
       <check name="AD_MODULE_ISTRIALALLOWED"><![CDATA[ISTRIALALLOWED IN ('Y', 
'N')]]></check>
diff -r c3118a9e5203 -r 2f26f004b049 
src-db/database/model/tables/AD_MODULE_INSTALL.xml
--- a/src-db/database/model/tables/AD_MODULE_INSTALL.xml        Mon Aug 10 
13:18:48 2015 +0200
+++ b/src-db/database/model/tables/AD_MODULE_INSTALL.xml        Mon Aug 10 
15:26:33 2015 +0200
@@ -174,6 +174,6 @@
       <check name="AD_MODULE_INS_ISREGISTERED_CHK"><![CDATA[ISREGISTERED IN 
('Y', 'N')]]></check>
       <check name="AD_MODULE_INS_TYPE_CHK"><![CDATA[TYPE IN ('M', 'P', 
'T')]]></check>
       <check name="AD_MODULE_INSTALL_FFT_CHK"><![CDATA[ISTRIALALLOWED IN ('Y', 
'N')]]></check>
-      <check name="AD_MODULE_INSTALL_ISDEFAUL_CHK"><![CDATA[(ISDEFAULT = 'N') 
OR ((ISDEFAULT = 'Y') AND (ISINDEVELOPMENT = 'Y'))]]></check>
+      <check name="AD_MODULE_INSTALL_ISDEFAUL_CHK"><![CDATA[ISDEFAULT = 'N' OR 
ISDEFAULT = 'Y' AND ISINDEVELOPMENT = 'Y']]></check>
     </table>
   </database>
diff -r c3118a9e5203 -r 2f26f004b049 src-db/database/model/tables/AD_ORG.xml
--- a/src-db/database/model/tables/AD_ORG.xml   Mon Aug 10 13:18:48 2015 +0200
+++ b/src-db/database/model/tables/AD_ORG.xml   Mon Aug 10 15:26:33 2015 +0200
@@ -92,7 +92,7 @@
         <unique-column name="AD_CLIENT_ID"/>
         <unique-column name="VALUE"/>
       </unique>
-      <check name="AD_ORG_CALENDAR_CHECK"><![CDATA[((ISPERIODCONTROLALLOWED = 
'Y') AND (C_CALENDAR_ID IS NOT NULL)) OR (C_CALENDAR_ID IS NULL)]]></check>
+      <check name="AD_ORG_CALENDAR_CHECK"><![CDATA[ISPERIODCONTROLALLOWED = 
'Y' AND C_CALENDAR_ID IS NOT NULL OR C_CALENDAR_ID IS NULL]]></check>
       <check name="AD_ORG_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 
'N')]]></check>
       <check 
name="AD_ORG_ISPERIODCONTROL_CHECK"><![CDATA[ISPERIODCONTROLALLOWED IN ('Y', 
'N')]]></check>
       <check name="AD_ORG_ISREADY_CHECK"><![CDATA[ISREADY IN ('Y', 
'N')]]></check>
diff -r c3118a9e5203 -r 2f26f004b049 src-db/database/model/tables/AD_ORGINFO.xml
--- a/src-db/database/model/tables/AD_ORGINFO.xml       Mon Aug 10 13:18:48 
2015 +0200
+++ b/src-db/database/model/tables/AD_ORGINFO.xml       Mon Aug 10 15:26:33 
2015 +0200
@@ -103,7 +103,7 @@
         <reference local="C_LOCATION_ID" foreign="C_LOCATION_ID"/>
       </foreign-key>
       <check name="AD_ORGINFO_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 
'N')]]></check>
-      <check name="AD_ORGINFO_ISCASHVAT_CH"><![CDATA[((ISCASHVAT = 'Y') AND 
(ISTAXUNDEDUCTABLE = 'N')) OR (ISCASHVAT = 'N')]]></check>
+      <check name="AD_ORGINFO_ISCASHVAT_CH"><![CDATA[ISCASHVAT = 'Y' AND 
ISTAXUNDEDUCTABLE = 'N' OR ISCASHVAT = 'N']]></check>
       <check name="AD_ORGINFO_ISDOUBLE_CH"><![CDATA[ISDOUBLECASH IN ('Y', 
'N')]]></check>
       <check name="AD_ORGINFO_ISTAXUNDEDUCTABLE"><![CDATA[ISTAXUNDEDUCTABLE IN 
('Y', 'N')]]></check>
     </table>
diff -r c3118a9e5203 -r 2f26f004b049 src-db/database/model/tables/AD_ORGTYPE.xml
--- a/src-db/database/model/tables/AD_ORGTYPE.xml       Mon Aug 10 13:18:48 
2015 +0200
+++ b/src-db/database/model/tables/AD_ORGTYPE.xml       Mon Aug 10 15:26:33 
2015 +0200
@@ -72,7 +72,7 @@
       <check name="AD_ORGTYPE_ISBU_CHECK"><![CDATA[ISBUSINESSUNIT IN ('Y', 
'N')]]></check>
       <check name="AD_ORGTYPE_ISDEFAULT_CHECK"><![CDATA[ISDEFAULT IN ('Y', 
'N')]]></check>
       <check name="AD_ORGTYPE_ISLEGALENTITY_CHECK"><![CDATA[ISLEGALENTITY IN 
('Y', 'N')]]></check>
-      <check name="AD_ORGTYPE_ISLEGALENTITY_CHK"><![CDATA[(((ISLEGALENTITY = 
'Y') AND (ISBUSINESSUNIT = 'N')) OR ((ISLEGALENTITY = 'N') AND (ISBUSINESSUNIT 
= 'Y'))) OR ((ISLEGALENTITY = 'N') AND (ISBUSINESSUNIT = 'N'))]]></check>
+      <check name="AD_ORGTYPE_ISLEGALENTITY_CHK"><![CDATA[ISLEGALENTITY = 'Y' 
AND ISBUSINESSUNIT = 'N' OR ISLEGALENTITY = 'N' AND ISBUSINESSUNIT = 'Y' OR 
ISLEGALENTITY = 'N' AND ISBUSINESSUNIT = 'N']]></check>
       <check 
name="AD_ORGTYPE_ISTRALLOWED_CHECK"><![CDATA[ISTRANSACTIONSALLOWED IN ('Y', 
'N')]]></check>
     </table>
   </database>
diff -r c3118a9e5203 -r 2f26f004b049 
src-db/database/model/tables/AD_ORG_ACCTSCHEMA.xml
--- a/src-db/database/model/tables/AD_ORG_ACCTSCHEMA.xml        Mon Aug 10 
13:18:48 2015 +0200
+++ b/src-db/database/model/tables/AD_ORG_ACCTSCHEMA.xml        Mon Aug 10 
15:26:33 2015 +0200
@@ -79,10 +79,10 @@
       <index name="AD_ORGACCTSCHEMA_ORG_IDX" unique="false">
         <index-column name="AD_ORG_ID"/>
       </index>
-      <check name="AD_ORG_ACCTSCHEMA_BPFIELDS_CHK"><![CDATA[(ISBPNEWACCOUNT = 
'N') OR ((((ISBPNEWACCOUNT = 'Y') AND (AD_SEQUENCE_BP_ID IS NOT NULL)) AND 
(ACCT_LENGTH IS NOT NULL)) AND (SUBACCT_LENGTH IS NOT NULL))]]></check>
+      <check name="AD_ORG_ACCTSCHEMA_BPFIELDS_CHK"><![CDATA[ISBPNEWACCOUNT = 
'N' OR ISBPNEWACCOUNT = 'Y' AND AD_SEQUENCE_BP_ID IS NOT NULL AND ACCT_LENGTH 
IS NOT NULL AND SUBACCT_LENGTH IS NOT NULL]]></check>
       <check name="AD_ORG_ACCTSCHEMA_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 
'N')]]></check>
       <check name="AD_ORG_ACCTSCHEMA_ISBPNEWA_CHK"><![CDATA[ISBPNEWACCOUNT IN 
('Y', 'N')]]></check>
       <check name="AD_ORG_ACCTSCHEMA_ISPRNEWA_CHK"><![CDATA[ISPRNEWACCOUNT IN 
('Y', 'N')]]></check>
-      <check name="AD_ORG_ACCTSCHEMA_PRFIELDS_CHK"><![CDATA[(ISPRNEWACCOUNT = 
'N') OR ((((ISPRNEWACCOUNT = 'Y') AND (AD_SEQUENCE_PR_ID IS NOT NULL)) AND 
(ACCT_LENGTH IS NOT NULL)) AND (SUBACCT_LENGTH IS NOT NULL))]]></check>
+      <check name="AD_ORG_ACCTSCHEMA_PRFIELDS_CHK"><![CDATA[ISPRNEWACCOUNT = 
'N' OR ISPRNEWACCOUNT = 'Y' AND AD_SEQUENCE_PR_ID IS NOT NULL AND ACCT_LENGTH 
IS NOT NULL AND SUBACCT_LENGTH IS NOT NULL]]></check>
     </table>
   </database>
diff -r c3118a9e5203 -r 2f26f004b049 
src-db/database/model/tables/AD_PREFERENCE.xml
--- a/src-db/database/model/tables/AD_PREFERENCE.xml    Mon Aug 10 13:18:48 
2015 +0200
+++ b/src-db/database/model/tables/AD_PREFERENCE.xml    Mon Aug 10 15:26:33 
2015 +0200
@@ -108,7 +108,7 @@
         <index-column name="PROPERTY"/>
       </index>
       <check name="AD_PREFERENCE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 
'N')]]></check>
-      <check name="AD_PREFERENCE_LIST_CHECK"><![CDATA[(((ISPROPERTYLIST = 'Y') 
AND (PROPERTY IS NOT NULL)) AND (ATTRIBUTE IS NULL)) OR (((ISPROPERTYLIST = 
'N') AND (ATTRIBUTE IS NOT NULL)) AND (PROPERTY IS NULL))]]></check>
+      <check name="AD_PREFERENCE_LIST_CHECK"><![CDATA[ISPROPERTYLIST = 'Y' AND 
PROPERTY IS NOT NULL AND ATTRIBUTE IS NULL OR ISPROPERTYLIST = 'N' AND 
ATTRIBUTE IS NOT NULL AND PROPERTY IS NULL]]></check>
       <check name="AD_PREFERENCE_SELECTED_CHECK"><![CDATA[SELECTED IN ('Y', 
'N')]]></check>
     </table>
   </database>
diff -r c3118a9e5203 -r 2f26f004b049 
src-db/database/model/tables/AD_PROCESS_REQUEST.xml
--- a/src-db/database/model/tables/AD_PROCESS_REQUEST.xml       Mon Aug 10 
13:18:48 2015 +0200
+++ b/src-db/database/model/tables/AD_PROCESS_REQUEST.xml       Mon Aug 10 
15:26:33 2015 +0200
@@ -227,8 +227,8 @@
       <foreign-key foreignTable="AD_PROCESS_REQUEST" 
name="AD_PROCESS_REQUEST_GROUP">
         <reference local="AD_PROCESS_REQUEST_GROUP_ID" 
foreign="AD_PROCESS_REQUEST_ID"/>
       </foreign-key>
-      <check name="AD_PROCESS_REQUEST_GROUP_CHK"><![CDATA[((ISGROUP = 'Y') AND 
(AD_PROCESS_GROUP_ID IS NOT NULL)) OR ((ISGROUP = 'N') AND (AD_PROCESS_GROUP_ID 
IS NULL))]]></check>
+      <check name="AD_PROCESS_REQUEST_GROUP_CHK"><![CDATA[ISGROUP = 'Y' AND 
AD_PROCESS_GROUP_ID IS NOT NULL OR ISGROUP = 'N' AND AD_PROCESS_GROUP_ID IS 
NULL]]></check>
       <check name="AD_PROCESS_REQUEST_ISGROUP_CHK"><![CDATA[ISGROUP IN ('Y', 
'N')]]></check>
-      <check name="AD_PROCESS_REQUEST_PROCESS_CHK"><![CDATA[((AD_PROCESS_ID IS 
NOT NULL) AND (AD_PROCESS_GROUP_ID IS NULL)) OR ((AD_PROCESS_GROUP_ID IS NOT 
NULL) AND (AD_PROCESS_ID IS NULL))]]></check>
+      <check name="AD_PROCESS_REQUEST_PROCESS_CHK"><![CDATA[AD_PROCESS_ID IS 
NOT NULL AND AD_PROCESS_GROUP_ID IS NULL OR AD_PROCESS_GROUP_ID IS NOT NULL AND 
AD_PROCESS_ID IS NULL]]></check>
     </table>
   </database>
diff -r c3118a9e5203 -r 2f26f004b049 src-db/database/model/tables/AD_TABLE.xml
--- a/src-db/database/model/tables/AD_TABLE.xml Mon Aug 10 13:18:48 2015 +0200
+++ b/src-db/database/model/tables/AD_TABLE.xml Mon Aug 10 15:26:33 2015 +0200
@@ -175,14 +175,14 @@
       <unique name="AD_TABLE_TREETYPE_UN">
         <unique-column name="TREETYPE"/>
       </unique>
-      <check name="AD_TABLE_CLASSNAME_CHK"><![CDATA[((UPPER((DATAORIGINTYPE)) 
= 'DATASOURCE') OR (UPPER((DATAORIGINTYPE)) = 'HQL')) OR (CLASSNAME IS NOT 
NULL)]]></check>
-      <check name="AD_TABLE_DATASOURCE_CHK"><![CDATA[(UPPER((DATAORIGINTYPE)) 
<> 'DATASOURCE') OR (OBSERDS_DATASOURCE_ID IS NOT NULL)]]></check>
-      <check name="AD_TABLE_HQL_CHK"><![CDATA[(UPPER((DATAORIGINTYPE)) <> 
'HQL') OR (HQLQUERY IS NOT NULL)]]></check>
+      <check name="AD_TABLE_CLASSNAME_CHK"><![CDATA[UPPER(DATAORIGINTYPE) = 
'DATASOURCE' OR UPPER(DATAORIGINTYPE) = 'HQL' OR CLASSNAME IS NOT 
NULL]]></check>
+      <check name="AD_TABLE_DATASOURCE_CHK"><![CDATA[UPPER(DATAORIGINTYPE) <> 
'DATASOURCE' OR OBSERDS_DATASOURCE_ID IS NOT NULL]]></check>
+      <check name="AD_TABLE_HQL_CHK"><![CDATA[UPPER(DATAORIGINTYPE) <> 'HQL' 
OR HQLQUERY IS NOT NULL]]></check>
       <check name="AD_TABLE_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 
'N')]]></check>
       <check name="AD_TABLE_ISAUDITINS_CHK"><![CDATA[ISAUDITINSERTS IN ('Y', 
'N')]]></check>
       <check name="AD_TABLE_ISDELETEABLE_CHK"><![CDATA[ISDELETEABLE IN ('Y', 
'N')]]></check>
       <check name="AD_TABLE_ISFULLYAUDITED_CHK"><![CDATA[ISFULLYAUDITED IN 
('Y', 'N')]]></check>
-      <check name="AD_TABLE_ISFULLYAUDITED_CHK2"><![CDATA[(ISFULLYAUDITED = 
'N') OR (UPPER((TABLENAME)) <> 'AD_AUDIT_TRAIL')]]></check>
+      <check name="AD_TABLE_ISFULLYAUDITED_CHK2"><![CDATA[ISFULLYAUDITED = 'N' 
OR UPPER(TABLENAME) <> 'AD_AUDIT_TRAIL']]></check>
       <check name="AD_TABLE_ISHIGHVOLUME_CHK"><![CDATA[ISHIGHVOLUME IN ('Y', 
'N')]]></check>
       <check name="AD_TABLE_ISSECUR_YENABLED_CHK"><![CDATA[ISSECURITYENABLED 
IN ('Y', 'N')]]></check>
       <check name="AD_TABLE_ISTREE_CHK"><![CDATA[ISTREE IN ('Y', 
'N')]]></check>
diff -r c3118a9e5203 -r 2f26f004b049 
src-db/database/model/tables/AD_TABLE_NAVIGATION.xml
--- a/src-db/database/model/tables/AD_TABLE_NAVIGATION.xml      Mon Aug 10 
13:18:48 2015 +0200
+++ b/src-db/database/model/tables/AD_TABLE_NAVIGATION.xml      Mon Aug 10 
15:26:33 2015 +0200
@@ -85,6 +85,6 @@
       <index name="AD_TABLE_NAVIGATION_TABLE_IDX" unique="false">
         <index-column name="AD_TABLE_ID"/>
       </index>
-      <check name="AD_TABLE_NAVIGATION_CHECK"><![CDATA[((DIRECTNAVIGATION = 
'N') AND (HQLLOGIC IS NOT NULL)) OR (DIRECTNAVIGATION = 'Y')]]></check>
+      <check name="AD_TABLE_NAVIGATION_CHECK"><![CDATA[DIRECTNAVIGATION = 'N' 
AND HQLLOGIC IS NOT NULL OR DIRECTNAVIGATION = 'Y']]></check>
     </table>
   </database>
diff -r c3118a9e5203 -r 2f26f004b049 src-db/database/model/tables/AD_WINDOW.xml
--- a/src-db/database/model/tables/AD_WINDOW.xml        Mon Aug 10 13:18:48 
2015 +0200
+++ b/src-db/database/model/tables/AD_WINDOW.xml        Mon Aug 10 15:26:33 
2015 +0200
@@ -98,6 +98,6 @@
       <check name="AD_WINDOW_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 
'N')]]></check>
       <check name="AD_WINDOW_ISSOTRX_CHK"><![CDATA[ISSOTRX IN ('Y', 
'N')]]></check>
       <check name="AD_WINDOW_ISTHREADSAFE_CHK"><![CDATA[ISTHREADSAFE IN ('Y', 
'N')]]></check>
-      <check name="AD_WINDOW_NAME_CHECK"><![CDATA[(INSTR(NAME, (CHR(39))) = 0) 
AND (INSTR(NAME, TO_CHAR('_')) = 0)]]></check>
+      <check name="AD_WINDOW_NAME_CHECK"><![CDATA[INSTR(NAME, CHR(39)) = 0 AND 
INSTR(NAME, TO_CHAR('_')) = 0]]></check>
     </table>
   </database>
diff -r c3118a9e5203 -r 2f26f004b049 src-db/database/model/tables/C_BANK.xml
--- a/src-db/database/model/tables/C_BANK.xml   Mon Aug 10 13:18:48 2015 +0200
+++ b/src-db/database/model/tables/C_BANK.xml   Mon Aug 10 15:26:33 2015 +0200
@@ -92,7 +92,7 @@
       <foreign-key foreignTable="C_LOCATION" name="C_BANK_C_LOCATION">
         <reference local="C_LOCATION_ID" foreign="C_LOCATION_ID"/>
       </foreign-key>
-      <check name="C_BANK_CODEBANK_CHK"><![CDATA[(((CODEBANK IS NULL) OR 
(LENGTH((CODEBANK)) = 4)) AND ((CODEBRANCH IS NULL) OR (LENGTH((CODEBRANCH)) = 
4))) AND ((DIGITCONTROL IS NULL) OR (LENGTH((DIGITCONTROL)) = 1))]]></check>
+      <check name="C_BANK_CODEBANK_CHK"><![CDATA[(CODEBANK IS NULL OR 
LENGTH(CODEBANK) = 4) AND (CODEBRANCH IS NULL OR LENGTH(CODEBRANCH) = 4) AND 
(DIGITCONTROL IS NULL OR LENGTH(DIGITCONTROL) = 1)]]></check>
       <check name="C_BANK_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 
'N')]]></check>
       <check name="C_BANK_ISOWNBANK_CHK"><![CDATA[ISOWNBANK IN ('Y', 
'N')]]></check>
     </table>
diff -r c3118a9e5203 -r 2f26f004b049 
src-db/database/model/tables/C_BANKACCOUNT.xml
--- a/src-db/database/model/tables/C_BANKACCOUNT.xml    Mon Aug 10 13:18:48 
2015 +0200
+++ b/src-db/database/model/tables/C_BANKACCOUNT.xml    Mon Aug 10 15:26:33 
2015 +0200
@@ -108,11 +108,11 @@
       <index name="C_BANKACCT_BANK" unique="false">
         <index-column name="C_BANK_ID"/>
       </index>
-      <check name="C_BANKACC_SHOWGENERIC_CHECK"><![CDATA[(GENERICACCOUNT IS 
NOT NULL) OR (SHOWGENERIC = 'N')]]></check>
-      <check name="C_BANKACC_SHOWIBAN_CHECK"><![CDATA[(IBAN IS NOT NULL) OR 
(SHOWIBAN = 'N')]]></check>
-      <check name="C_BANKACC_SHOWONE_CHECK"><![CDATA[((((SHOWSPANISH = 'Y') 
AND (SHOWGENERIC = 'N')) AND (SHOWIBAN = 'N')) OR (((SHOWSPANISH = 'N') AND 
(SHOWGENERIC = 'Y')) AND (SHOWIBAN = 'N'))) OR (((SHOWSPANISH = 'N') AND 
(SHOWGENERIC = 'N')) AND (SHOWIBAN = 'Y'))]]></check>
-      <check name="C_BANKACC_SHOWSPANISH_CHECK"><![CDATA[((((DIGITCONTROL IS 
NOT NULL) AND (CODEACCOUNT IS NOT NULL)) AND (LENGTH((DIGITCONTROL)) = 1)) AND 
(LENGTH((CODEACCOUNT)) = 10)) OR (((DIGITCONTROL IS NULL) AND (CODEACCOUNT IS 
NULL)) AND (SHOWSPANISH = 'N'))]]></check>
-      <check name="C_BANKACCOUNT_ACCOUNTNO_CHECK"><![CDATA[((GENERICACCOUNT IS 
NOT NULL) OR (IBAN IS NOT NULL)) OR ((CODEACCOUNT IS NOT NULL) AND 
(DIGITCONTROL IS NOT NULL))]]></check>
+      <check name="C_BANKACC_SHOWGENERIC_CHECK"><![CDATA[GENERICACCOUNT IS NOT 
NULL OR SHOWGENERIC = 'N']]></check>
+      <check name="C_BANKACC_SHOWIBAN_CHECK"><![CDATA[IBAN IS NOT NULL OR 
SHOWIBAN = 'N']]></check>
+      <check name="C_BANKACC_SHOWONE_CHECK"><![CDATA[SHOWSPANISH = 'Y' AND 
SHOWGENERIC = 'N' AND SHOWIBAN = 'N' OR SHOWSPANISH = 'N' AND SHOWGENERIC = 'Y' 
AND SHOWIBAN = 'N' OR SHOWSPANISH = 'N' AND SHOWGENERIC = 'N' AND SHOWIBAN = 
'Y']]></check>
+      <check name="C_BANKACC_SHOWSPANISH_CHECK"><![CDATA[DIGITCONTROL IS NOT 
NULL AND CODEACCOUNT IS NOT NULL AND LENGTH(DIGITCONTROL) = 1 AND 
LENGTH(CODEACCOUNT) = 10 OR DIGITCONTROL IS NULL AND CODEACCOUNT IS NULL AND 
SHOWSPANISH = 'N']]></check>
+      <check name="C_BANKACCOUNT_ACCOUNTNO_CHECK"><![CDATA[GENERICACCOUNT IS 
NOT NULL OR IBAN IS NOT NULL OR CODEACCOUNT IS NOT NULL AND DIGITCONTROL IS NOT 
NULL]]></check>
       <check name="C_BANKACCOUNT_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 
'N')]]></check>
     </table>
   </database>
diff -r c3118a9e5203 -r 2f26f004b049 
src-db/database/model/tables/C_BANKSTATEMENTLINE.xml
--- a/src-db/database/model/tables/C_BANKSTATEMENTLINE.xml      Mon Aug 10 
13:18:48 2015 +0200
+++ b/src-db/database/model/tables/C_BANKSTATEMENTLINE.xml      Mon Aug 10 
15:26:33 2015 +0200
@@ -129,6 +129,6 @@
         <index-column name="C_BANKSTATEMENT_ID"/>
       </index>
       <check name="C_BANKSTATLN_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 
'N')]]></check>
-      <check name="C_BANKSTATLN_PA_GLITEM_ID_CHK"><![CDATA[((C_DEBT_PAYMENT_ID 
IS NOT NULL) AND (C_GLITEM_ID IS NULL)) OR (C_DEBT_PAYMENT_ID IS 
NULL)]]></check>
+      <check name="C_BANKSTATLN_PA_GLITEM_ID_CHK"><![CDATA[C_DEBT_PAYMENT_ID 
IS NOT NULL AND C_GLITEM_ID IS NULL OR C_DEBT_PAYMENT_ID IS NULL]]></check>
     </table>
   </database>
diff -r c3118a9e5203 -r 2f26f004b049 src-db/database/model/tables/C_BPARTNER.xml
--- a/src-db/database/model/tables/C_BPARTNER.xml       Mon Aug 10 13:18:48 
2015 +0200
+++ b/src-db/database/model/tables/C_BPARTNER.xml       Mon Aug 10 15:26:33 
2015 +0200
@@ -465,8 +465,8 @@
         <unique-column name="VALUE"/>
       </unique>
       <check name="C_BPARTNER_CBLOCKING_CHK"><![CDATA[CUSTOMER_BLOCKING IN 
('Y', 'N')]]></check>
-      <check name="C_BPARTNER_CUSBLOCKING_CHK"><![CDATA[(CUSTOMER_BLOCKING = 
'N') OR ((((SO_ORDER_BLOCKING = 'Y') OR (SO_GOODS_BLOCKING = 'Y')) OR 
(SO_INVOICE_BLOCKING = 'Y')) OR (SO_PAYMENT_BLOCKING = 'Y'))]]></check>
-      <check name="C_BPARTNER_INVOICERULE_CHK"><![CDATA[((INVOICERULE) <> 'S') 
OR (C_INVOICESCHEDULE_ID IS NOT NULL)]]></check>
+      <check name="C_BPARTNER_CUSBLOCKING_CHK"><![CDATA[CUSTOMER_BLOCKING = 
'N' OR SO_ORDER_BLOCKING = 'Y' OR SO_GOODS_BLOCKING = 'Y' OR 
SO_INVOICE_BLOCKING = 'Y' OR SO_PAYMENT_BLOCKING = 'Y']]></check>
+      <check name="C_BPARTNER_INVOICERULE_CHK"><![CDATA[INVOICERULE <> 'S' OR 
C_INVOICESCHEDULE_ID IS NOT NULL]]></check>
       <check name="C_BPARTNER_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 
'N')]]></check>
       <check name="C_BPARTNER_ISCASHVAT_CH"><![CDATA[ISCASHVAT IN ('Y', 
'N')]]></check>
       <check name="C_BPARTNER_ISCUSTOMER_CHK"><![CDATA[ISCUSTOMER IN ('Y', 
'N')]]></check>
@@ -488,6 +488,6 @@
       <check name="C_BPARTNER_SOBLOCKING_CHK"><![CDATA[SO_ORDER_BLOCKING IN 
('Y', 'N')]]></check>
       <check name="C_BPARTNER_SPBLOCKING_CHK"><![CDATA[SO_PAYMENT_BLOCKING IN 
('Y', 'N')]]></check>
       <check name="C_BPARTNER_VBLOCKING_CHK"><![CDATA[VENDOR_BLOCKING IN ('Y', 
'N')]]></check>
-      <check name="C_BPARTNER_VENBLOCKING_CHK"><![CDATA[(VENDOR_BLOCKING = 
'N') OR ((((PO_ORDER_BLOCKING = 'Y') OR (PO_GOODS_BLOCKING = 'Y')) OR 
(PO_INVOICE_BLOCKING = 'Y')) OR (PO_PAYMENT_BLOCKING = 'Y'))]]></check>
+      <check name="C_BPARTNER_VENBLOCKING_CHK"><![CDATA[VENDOR_BLOCKING = 'N' 
OR PO_ORDER_BLOCKING = 'Y' OR PO_GOODS_BLOCKING = 'Y' OR PO_INVOICE_BLOCKING = 
'Y' OR PO_PAYMENT_BLOCKING = 'Y']]></check>
     </table>
   </database>
diff -r c3118a9e5203 -r 2f26f004b049 
src-db/database/model/tables/C_BP_BANKACCOUNT.xml
--- a/src-db/database/model/tables/C_BP_BANKACCOUNT.xml Mon Aug 10 13:18:48 
2015 +0200
+++ b/src-db/database/model/tables/C_BP_BANKACCOUNT.xml Mon Aug 10 15:26:33 
2015 +0200
@@ -159,10 +159,10 @@
       <index name="C_BPBANKACCT_BPARTNER" unique="false">
         <index-column name="C_BPARTNER_ID"/>
       </index>
-      <check name="C_BP_BACC_COUNTRY_CHECK"><![CDATA[(IBAN IS NULL) OR 
(C_COUNTRY_ID IS NOT NULL)]]></check>
-      <check name="C_BP_BACC_SHOWGENERIC_CHK"><![CDATA[((UPPER((BANKFORMAT)) = 
UPPER('GENERIC')) AND (ACCOUNTNO IS NOT NULL)) OR (UPPER((BANKFORMAT)) <> 
UPPER('GENERIC'))]]></check>
-      <check name="C_BP_BACC_SHOWIBAN_CHK"><![CDATA[((UPPER((BANKFORMAT)) = 
UPPER('IBAN')) AND (IBAN IS NOT NULL)) OR (UPPER((BANKFORMAT)) <> 
UPPER('IBAN'))]]></check>
-      <check name="C_BP_BACC_SHOWSWIFT_CHK"><![CDATA[(((UPPER((BANKFORMAT)) = 
UPPER('SWIFT')) AND (SWIFTCODE IS NOT NULL)) AND (ACCOUNTNO IS NOT NULL)) OR 
(UPPER((BANKFORMAT)) <> UPPER('SWIFT'))]]></check>
+      <check name="C_BP_BACC_COUNTRY_CHECK"><![CDATA[IBAN IS NULL OR 
C_COUNTRY_ID IS NOT NULL]]></check>
+      <check name="C_BP_BACC_SHOWGENERIC_CHK"><![CDATA[UPPER(BANKFORMAT) = 
UPPER('GENERIC') AND ACCOUNTNO IS NOT NULL OR UPPER(BANKFORMAT) <> 
UPPER('GENERIC')]]></check>
+      <check name="C_BP_BACC_SHOWIBAN_CHK"><![CDATA[UPPER(BANKFORMAT) = 
UPPER('IBAN') AND IBAN IS NOT NULL OR UPPER(BANKFORMAT) <> 
UPPER('IBAN')]]></check>
+      <check name="C_BP_BACC_SHOWSWIFT_CHK"><![CDATA[UPPER(BANKFORMAT) = 
UPPER('SWIFT') AND SWIFTCODE IS NOT NULL AND ACCOUNTNO IS NOT NULL OR 
UPPER(BANKFORMAT) <> UPPER('SWIFT')]]></check>
       <check name="C_BP_BANKACCOUNT_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 
'N')]]></check>
     </table>
   </database>
diff -r c3118a9e5203 -r 2f26f004b049 src-db/database/model/tables/C_CASHLINE.xml
--- a/src-db/database/model/tables/C_CASHLINE.xml       Mon Aug 10 13:18:48 
2015 +0200
+++ b/src-db/database/model/tables/C_CASHLINE.xml       Mon Aug 10 15:26:33 
2015 +0200
@@ -122,8 +122,8 @@
       <unique name="C_CASHLINE_DEBT_PAYMENT">
         <unique-column name="C_DEBT_PAYMENT_ID"/>
       </unique>
-      <check name="C_CASHLINE_CASHTYPE_CHK"><![CDATA[((CASHTYPE) <> 'C') OR 
(C_CHARGE_ID IS NOT NULL)]]></check>
-      <check name="C_CASHLINE_CASHTYPE_CHK1"><![CDATA[((CASHTYPE) <> 'G') OR 
(C_GLITEM_ID IS NOT NULL)]]></check>
+      <check name="C_CASHLINE_CASHTYPE_CHK"><![CDATA[CASHTYPE <> 'C' OR 
C_CHARGE_ID IS NOT NULL]]></check>
+      <check name="C_CASHLINE_CASHTYPE_CHK1"><![CDATA[CASHTYPE <> 'G' OR 
C_GLITEM_ID IS NOT NULL]]></check>
       <check name="C_CASHLINE_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 
'N')]]></check>
       <check name="C_CASHLINE_ISGENERATED_CHK"><![CDATA[ISGENERATED IN ('Y', 
'N')]]></check>

------------------------------------------------------------------------------
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to