[5618] | 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 | $setup_info['expressoCalendar']['currentver'] = '1.000'; |
---|
| 15 | |
---|
| 16 | $oProc = $GLOBALS['phpgw_setup']->oProc; |
---|
| 17 | |
---|
| 18 | $oProc->query('ALTER TABLE calendar_participant ADD COLUMN acl varchar(10) not null DEFAULT "r" '); |
---|
| 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 | $oProc->query('UPDATE calendar_participant SET acl = "rowi" where is_organizer = 1 '); |
---|
| 22 | |
---|
| 23 | $oProc->query('ALTER TABLE calendar_object ALTER COLUMN range_start TYPE bigint USING (date_part("epoch",(cast(range_start as timestamp)))::int * 1000)'); |
---|
| 24 | $oProc->query('ALTER TABLE calendar_object ALTER COLUMN range_end TYPE bigint USING (date_part("epoch",(cast(range_end as timestamp)))::int * 1000)'); |
---|
| 25 | |
---|
| 26 | $oProc->query('ALTER TABLE calendar_alarm ALTER COLUMN range_end TYPE bigint USING (date_part("epoch",(cast(range_end as timestamp)))::int) * 1000)'); |
---|
| 27 | $oProc->query('ALTER TABLE calendar_alarm ALTER COLUMN range_start TYPE bigint USING (date_part("epoch",(cast(range_start as timestamp)))::int) * 1000)'); |
---|
| 28 | |
---|
| 29 | $oProc->query('ALTER TABLE attachment ADD COLUMN owner TYPE int'); |
---|
| 30 | |
---|
| 31 | $GLOBALS['setup_info']['expressoCalendar']['currentver'] = '1.001'; |
---|
| 32 | return $GLOBALS['setup_info']['expressoCalendar']['currentver']; |
---|
| 33 | } |
---|
| 34 | |
---|
| 35 | ?> |
---|