9f29b2c31720ef4e0e2464d8d0a4d5d6ec755dd0
[tine20] / tine20 / Timetracker / Setup / Update / Release10.php
1 <?php
2 /**
3  * Tine 2.0
4  *
5  * @package     Timetracker
6  * @subpackage  Setup
7  * @license     http://www.gnu.org/licenses/agpl.html AGPL3
8  * @copyright   Copyright (c) 2017 Metaways Infosystems GmbH (http://www.metaways.de)
9  * @author      Michael Spahn <m.spahn@metaways.de>
10  */
11 class Timetracker_Setup_Update_Release10 extends Setup_Update_Abstract
12 {
13     /**
14      * update to 10.1
15      *
16      * Add fulltext index to field description of timesheet
17      */
18     public function update_0()
19     {
20         $declaration = new Setup_Backend_Schema_Index_Xml('
21             <index>
22                 <name>description</name>
23                 <fulltext>true</fulltext>
24                 <field>
25                     <name>description</name>
26                 </field>
27             </index>
28         ');
29
30         try {
31             $this->_backend->addIndex('timetracker_timesheet', $declaration);
32         } catch (Exception $e) {
33             Tinebase_Exception::log($e);
34         }
35
36         $this->setTableVersion('timetracker_timesheet', '6');
37         $this->setApplicationVersion('Timetracker', '10.1');
38     }
39
40     /**
41      * update to 10.2
42      *
43      * Add fulltext index to field description of timeaccount
44      */
45     public function update_1()
46     {
47         $declaration = new Setup_Backend_Schema_Index_Xml('
48             <index>
49                 <name>description</name>
50                 <fulltext>true</fulltext>
51                 <field>
52                     <name>description</name>
53                 </field>
54             </index>
55         ');
56
57         try {
58             $this->_backend->addIndex('timetracker_timeaccount', $declaration);
59         } catch (Exception $e) {
60             Tinebase_Exception::log($e);
61         }
62
63         $this->setTableVersion('timetracker_timeaccount', '11');
64         $this->setApplicationVersion('Timetracker', '10.2');
65     }
66
67     public function update_2()
68     {
69         $this->setApplicationVersion('Timetracker', '10.3');
70     }
71 }