[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 | \**************************************************************************/ |
---|
[5647] | 11 | |
---|
[5618] | 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 | |
---|
[5645] | 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'); |
---|
[5618] | 24 | |
---|
[5645] | 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'); |
---|
[5618] | 27 | |
---|
[5647] | 28 | $oProc->query('ALTER TABLE attachment ADD COLUMN owner integer'); |
---|
[5618] | 29 | |
---|
| 30 | $GLOBALS['setup_info']['expressoCalendar']['currentver'] = '1.001'; |
---|
| 31 | return $GLOBALS['setup_info']['expressoCalendar']['currentver']; |
---|
| 32 | } |
---|
| 33 | ?> |
---|