Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Revisions: Issue #35519 All Revisions ] Back to Issue ]
Summary 0035519: can only have one function column in db indexes
Revision 2017-03-15 14:07 by alostale
Steps To Reproduce 1. Create the following index in PG:
CREATE INDEX c_bpartner_name2_id
  ON c_bpartner
  USING btree
  (UPPER(REPLACE(name, 'a', 'b')),
   UPPER(c_bpartner_id));
2. export database
3. check how it gets exported -> ERROR: both functions are merged in a single column
hg diff src-db/database/model/tables/C_BPARTNER.xml
diff -r afcca1baf74c src-db/database/model/tables/C_BPARTNER.xml
--- a/src-db/database/model/tables/C_BPARTNER.xml Tue Mar 14 09:22:54 2017 +0100
+++ b/src-db/database/model/tables/C_BPARTNER.xml Wed Mar 15 10:17:33 2017 +0100
@@ -468,6 +468,9 @@
         <index-column name="NAME"/>
         <index-column name="C_BPARTNER_ID"/>
       </index>
+ <index name="C_BPARTNER_NAME2_ID" unique="false">
+ <index-column name="functionBasedColumn" functionExpression="UPPER(REPLACE(NAME,'a','b')), upper(c_bpartner_id)"/>
+ </index>
       <index name="C_BPARTNER_REFNO_ID" unique="false">
         <index-column name="REFERENCENO"/>
         <index-column name="C_BPARTNER_ID"/>
4. update database
5. Check index definition
  -> ERROR: it is not as the original
Revision 2017-03-15 10:19 by alostale
Steps To Reproduce 1. Create the following index in PG:
CREATE INDEX c_bpartner_name2_id
  ON c_bpartner
  USING btree
  (UPPER(REPLACE(name, 'a', 'b')),
   UPPER(c_bpartner_id));
2. export database
3. check how it gets exported -> ERROR: both functions are merged in a single column
hg diff src-db/database/model/tables/C_BPARTNER.xml
diff -r afcca1baf74c src-db/database/model/tables/C_BPARTNER.xml
--- a/src-db/database/model/tables/C_BPARTNER.xml Tue Mar 14 09:22:54 2017 +0100
+++ b/src-db/database/model/tables/C_BPARTNER.xml Wed Mar 15 10:17:33 2017 +0100
@@ -468,6 +468,9 @@
         <index-column name="NAME"/>
         <index-column name="C_BPARTNER_ID"/>
       </index>
+ <index name="C_BPARTNER_NAME2_ID" unique="false">
+ <index-column name="functionBasedColumn" functionExpression="UPPER(REPLACE(NAME,'a','b')), upper(c_bpartner_id)"/>
+ </index>
       <index name="C_BPARTNER_REFNO_ID" unique="false">
         <index-column name="REFERENCENO"/>
         <index-column name="C_BPARTNER_ID"/>
4. update database
5. Check index definition
  -> ERROR: it is not as the original


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker