[2] | 1 | <?php |
---|
| 2 | /**************************************************************************\ |
---|
| 3 | * eGroupWare - Setup * |
---|
| 4 | * http://www.egroupware.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 | \**************************************************************************/ |
---|
[361] | 11 | function addSpecialColumn($table,$column, $attrs){ |
---|
| 12 | $result = $GLOBALS['phpgw_setup']->db->metadata($table); |
---|
| 13 | if($result){ |
---|
| 14 | foreach($result as $idx => $col){ |
---|
| 15 | if($col['name'] == $column) |
---|
| 16 | return; |
---|
| 17 | } |
---|
| 18 | } |
---|
| 19 | $GLOBALS['phpgw_setup']->db->query("ALTER TABLE ".$table." ADD COLUMN ".$column." ".$attrs); |
---|
| 20 | } |
---|
[166] | 21 | $test[] = '0.9.2'; |
---|
| 22 | function calendar_upgrade0_9_2() |
---|
[2] | 23 | { |
---|
| 24 | $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.17'; |
---|
| 25 | return $GLOBALS['setup_info']['calendar']['currentver']; |
---|
| 26 | } |
---|
| 27 | $test[] = '0.9.17'; |
---|
| 28 | function calendar_upgrade0_9_17() |
---|
| 29 | { |
---|
[134] | 30 | $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.21'; |
---|
| 31 | return $GLOBALS['setup_info']['calendar']['currentver']; |
---|
[204] | 32 | } |
---|
| 33 | $test[] = '0.9.20'; |
---|
| 34 | function calendar_upgrade0_9_20() |
---|
| 35 | { |
---|
| 36 | $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.21'; |
---|
| 37 | return $GLOBALS['setup_info']['calendar']['currentver']; |
---|
[166] | 38 | } |
---|
[204] | 39 | $test[] = '0.9.21'; |
---|
| 40 | function calendar_upgrade0_9_21() |
---|
| 41 | { |
---|
[361] | 42 | addSpecialColumn("phpgw_cal","last_status","char(1) DEFAULT 'N'::bpchar"); |
---|
| 43 | addSpecialColumn("phpgw_cal","last_update","int8 DEFAULT (date_part('epoch'::text, ('now'::text)::timestamp(3) with time zone) * (1000)::double precision)"); |
---|
[204] | 44 | $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.22'; |
---|
| 45 | return $GLOBALS['setup_info']['calendar']['currentver']; |
---|
[361] | 46 | } |
---|
| 47 | $test[] = '0.9.22'; |
---|
| 48 | function calendar_upgrade0_9_22() |
---|
| 49 | { |
---|
| 50 | $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.23'; |
---|
| 51 | return $GLOBALS['setup_info']['calendar']['currentver']; |
---|
[204] | 52 | } |
---|
[704] | 53 | $test[] = '0.9.23'; |
---|
| 54 | function calendar_upgrade0_9_23() |
---|
| 55 | { |
---|
| 56 | $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.3'; |
---|
| 57 | return $GLOBALS['setup_info']['calendar']['currentver']; |
---|
| 58 | } |
---|
[1323] | 59 | $test[] = '0.9.3'; |
---|
| 60 | function calendar_upgrade0_9_3() |
---|
| 61 | { |
---|
| 62 | $GLOBALS['setup_info']['calendar']['currentver'] = '2.0.000'; |
---|
| 63 | return $GLOBALS['setup_info']['calendar']['currentver']; |
---|
| 64 | } |
---|
[1728] | 65 | $test[] = '2.0.000'; |
---|
| 66 | function calendar_upgrade2_0_000() |
---|
| 67 | { |
---|
[1835] | 68 | $GLOBALS['setup_info']['calendar']['currentver'] = '2.0.001'; |
---|
| 69 | return $GLOBALS['setup_info']['calendar']['currentver']; |
---|
| 70 | } |
---|
| 71 | $test[] = '2.0.001'; |
---|
| 72 | function calendar_upgrade2_0_001() |
---|
| 73 | { |
---|
| 74 | $GLOBALS['setup_info']['calendar']['currentver'] = '2.0.002'; |
---|
| 75 | return $GLOBALS['setup_info']['calendar']['currentver']; |
---|
| 76 | } |
---|
| 77 | $test[] = '2.0.002'; |
---|
| 78 | function calendar_upgrade2_0_002() |
---|
| 79 | { |
---|
[1728] | 80 | $GLOBALS['setup_info']['calendar']['currentver'] = '2.1.000'; |
---|
| 81 | return $GLOBALS['setup_info']['calendar']['currentver']; |
---|
| 82 | } |
---|
[361] | 83 | ?> |
---|