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 character varying(10) not null DEFAULT 'r' "); |
---|
18 | |
---|
19 | $oProc->query("ALTER TABLE calendar_participant ADD COLUMN receive_notification smallint not null DEFAULT 1 "); |
---|
20 | $oProc->query('ALTER TABLE calendar_participant RENAME COLUMN delegated_to TO delegated_from '); |
---|
21 | |
---|
22 | $oProc->query("UPDATE calendar_participant SET acl = 'rowi' where is_organizer = 1 "); |
---|
23 | |
---|
24 | $oProc->query('ALTER TABLE calendar_object ALTER COLUMN range_start TYPE bigint USING (date_part(\'epoch\',(cast(range_start as timestamp)))::bigint) * 1000'); |
---|
25 | $oProc->query('ALTER TABLE calendar_object ALTER COLUMN range_end TYPE bigint USING (date_part(\'epoch\',(cast(range_end as timestamp)))::bigint) * 1000'); |
---|
26 | |
---|
27 | $oProc->query('ALTER TABLE calendar_alarm ALTER COLUMN range_end TYPE bigint USING (date_part(\'epoch\',(cast(range_end as timestamp)))::bigint) * 1000'); |
---|
28 | $oProc->query('ALTER TABLE calendar_alarm ALTER COLUMN range_start TYPE bigint USING (date_part(\'epoch\',(cast(range_start as timestamp)))::bigint) * 1000'); |
---|
29 | |
---|
30 | $oProc->query("ALTER TABLE attachment ADD COLUMN owner integer"); |
---|
31 | |
---|
32 | $GLOBALS['setup_info']['expressoCalendar']['currentver'] = '1.001'; |
---|
33 | return $GLOBALS['setup_info']['expressoCalendar']['currentver']; |
---|
34 | } |
---|
35 | ?> |
---|