Sales - add full text index to orderconf table
authorPaul Mehrer <p.mehrer@metaways.de>
Fri, 30 Jun 2017 14:33:49 +0000 (16:33 +0200)
committerPaul Mehrer <p.mehrer@metaways.de>
Fri, 30 Jun 2017 15:25:44 +0000 (17:25 +0200)
Change-Id: I1cecabcd5a46bb6c5ed599e5ca013184aad953d8
Reviewed-on: http://gerrit.tine20.com/customers/4989
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Paul Mehrer <p.mehrer@metaways.de>
Tested-by: Paul Mehrer <p.mehrer@metaways.de>
tine20/Sales/Setup/Update/Release10.php
tine20/Sales/Setup/setup.xml

index abecf3b..8e8163c 100644 (file)
@@ -189,4 +189,24 @@ class Sales_Setup_Update_Release10 extends Setup_Update_Abstract
         $this->setTableVersion('sales_offers', 2);
         $this->setApplicationVersion('Sales', '10.8');
     }
+
+    /**
+     * update to 10.9
+     *
+     * Add fulltext index for description field of sales_offers
+     */
+    public function update_8()
+    {
+        $declaration = new Setup_Backend_Schema_Index_Xml('<index>
+                <name>description</name>
+                <fulltext>true</fulltext>
+                <field>
+                <name>description</name>
+                </field>
+            </index>');
+        $this->_backend->addIndex('sales_orderconf', $declaration);
+
+        $this->setTableVersion('sales_orderconf', 2);
+        $this->setApplicationVersion('Sales', '10.9');
+    }
 }
index 09e0867..43288cc 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <application>
     <name>Sales</name>
-    <version>10.8</version>
+    <version>10.9</version>
     <order>50</order>
     <status>enabled</status>
     <tables>
         </table>
         <table>
             <name>sales_orderconf</name>
-            <version>1</version>
+            <version>2</version>
             <declaration>
                 <field>
                     <name>id</name>
                         <name>id</name>
                     </field>
                 </index>
+                <index>
+                    <name>description</name>
+                    <fulltext>true</fulltext>
+                    <field>
+                        <name>description</name>
+                    </field>
+                </index>
             </declaration>
         </table>
         <table>