source: trunk/expressoCalendar/setup/tables_update.inc.php @ 5647

Revision 5647, 2.0 KB checked in by acoutinho, 12 years ago (diff)

Ticket #2434 - Alteracao no nome do arquivo de update da nova agenda

Line 
1<?php
2        /**************************************************************************\
3        * ExpressoLivre - Setup                                                     *
4        * http://www.expressolivre.org                                              *
5        * --------------------------------------------                             *
6        * This program is free software; you can redistribute it and/or modify it  *
7        * under the terms of the GNU General Public License as published by the    *
8        * Free Software Foundation; either version 2 of the License, or (at your   *
9        * option) any later version.                                               *
10        \**************************************************************************/
11
12        $test[] = '1.000';
13        function expressoCalendar_upgrade1_000() {
14
15                $oProc = $GLOBALS['phpgw_setup']->oProc;
16
17                $oProc->query('ALTER TABLE calendar_participant ADD COLUMN acl varchar(10) not null DEFAULT "r" ');
18                $oProc->query('ALTER TABLE calendar_participant ADD COLUMN receive_notification smallint not null DEFAULT 1 ');
19                $oProc->query('ALTER TABLE calendar_participant RENAME COLUMN delegated_to TO delegated_from ');
20                $oProc->query('UPDATE calendar_participant SET acl = "rowi" where is_organizer = 1 ');
21
22                $oProc->query('ALTER TABLE calendar_object  ALTER COLUMN range_start TYPE bigint USING (date_part(\'epoch\',(cast(range_start as timestamp)))::bigint) * 1000');
23                $oProc->query('ALTER TABLE calendar_object  ALTER COLUMN range_end TYPE bigint USING (date_part(\'epoch\',(cast(range_end as timestamp)))::bigint) * 1000');
24
25                $oProc->query('ALTER TABLE calendar_alarm ALTER COLUMN range_end TYPE bigint USING (date_part(\'epoch\',(cast(range_end as timestamp)))::bigint) * 1000');
26                $oProc->query('ALTER TABLE calendar_alarm ALTER COLUMN range_start TYPE bigint USING (date_part(\'epoch\',(cast(range_start as timestamp)))::bigint) * 1000');
27
28                $oProc->query('ALTER TABLE attachment ADD COLUMN owner integer');
29
30                $GLOBALS['setup_info']['expressoCalendar']['currentver'] = '1.001';
31        return $GLOBALS['setup_info']['expressoCalendar']['currentver'];
32        }
33?>
Note: See TracBrowser for help on using the repository browser.