Setup - add missing application version updates
[tine20] / tine20 / Projects / Setup / Update / Release10.php
1 <?php
2 /**
3  * Tine 2.0
4  *
5  * @package     Projects
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 Projects_Setup_Update_Release10 extends Setup_Update_Abstract
12 {
13     /**
14      * update to 10.1
15      *
16      * Add fulltext index to description field of projects_project
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         $this->_backend->addIndex('projects_project', $declaration);
31
32         $this->setTableVersion('projects_project', '3');
33         $this->setApplicationVersion('Projects', '10.1');
34     }
35
36     public function update_1()
37     {
38         $this->setApplicationVersion('Projects', '10.2');
39     }
40 }