- Timestamp:
- 07/20/12 11:32:01 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.4.2-expresso1/expressoCalendar/setup/tables_update.inc.php
r6797 r6832 57 57 58 58 $oProc->CreateTable('calendar_repeat_ranges', array( 59 60 61 62 63 64 65 66 67 68 69 59 'fd' => array( 60 'id' => array( 'type' => 'auto', 'nullable' => False), 61 'range_start' => array( 'type' => 'bigint','precision' => '16', 'nullable' => False), 62 'range_end' => array( 'type' => 'bigint', 'precision' => '16', 'nullable' => False), 63 'user_info_id' => array( 'type' => 'bigint', 'precision' => '16', 'nullable' => False) 64 ), 65 'pk' => array('id'), 66 'fk' => array(), 67 'ix' => array(), 68 'uc' => array() 69 ) 70 70 ); 71 71 … … 79 79 function expressoCalendar_upgrade1_002() { 80 80 81 81 $oProc = $GLOBALS['phpgw_setup']->oProc; 82 82 83 83 $oProc->query("ALTER TABLE calendar_repeat_occurrence ADD COLUMN exception smallint DEFAULT 0"); 84 84 85 86 85 $GLOBALS['setup_info']['expressoCalendar']['currentver'] = '1.003'; 86 return $GLOBALS['setup_info']['expressoCalendar']['currentver']; 87 87 }; 88 88 89 89 $test[] = '1.003'; 90 90 function expressoCalendar_upgrade1_003() { 91 92 91 $GLOBALS['setup_info']['expressoCalendar']['currentver'] = '1.004'; 92 return $GLOBALS['setup_info']['expressoCalendar']['currentver']; 93 93 }; 94 94 95 95 $test[] = '1.004'; 96 96 function expressoCalendar_upgrade1_004() { 97 98 97 $oProc = $GLOBALS['phpgw_setup']->oProc; 98 $oProc->query("ALTER TABLE calendar_repeat_occurrence ALTER COLUMN exception SET default 0"); 99 99 100 101 100 $GLOBALS['setup_info']['expressoCalendar']['currentver'] = '1.005'; 101 return $GLOBALS['setup_info']['expressoCalendar']['currentver']; 102 102 }; 103 103 104 104 $test[] = '1.005'; 105 105 function expressoCalendar_upgrade1_005() { 106 107 106 $oProc = $GLOBALS['phpgw_setup']->oProc; 107 $oProc->query("ALTER TABLE calendar_alarm ADD COLUMN alarm_offset bigint;"); 108 108 $oProc->query("UPDATE calendar_alarm SET alarm_offset = obj.range_start - calendar_alarm.range_start FROM calendar_object as obj WHERE obj.id = object_id;"); 109 109 $oProc->query("ALTER TABLE calendar_alarm DROP COLUMN range_start;"); 110 110 $oProc->query("ALTER TABLE calendar_alarm DROP COLUMN range_end;"); 111 112 111 $GLOBALS['setup_info']['expressoCalendar']['currentver'] = '1.006'; 112 return $GLOBALS['setup_info']['expressoCalendar']['currentver']; 113 113 }; 114 114 … … 129 129 130 130 $oProc->query("ALTER TABLE calendar ADD COLUMN type smallint DEFAULT 0;"); 131 132 131 $oProc->query("ALTER TABLE calendar_signature ADD COLUMN type smallint DEFAULT 0;"); 132 133 $oProc->query("INSERT INTO calendar_object_type(id, name) VALUES ('2', 'TODO');"); 133 134 134 135 $GLOBALS['setup_info']['expressoCalendar']['currentver'] = '1.008';
Note: See TracChangeset
for help on using the changeset viewer.