Changeset 5715 for trunk/expressoCalendar/setup/tables_update.inc.php
- Timestamp:
- 03/13/12 18:23:02 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoCalendar/setup/tables_update.inc.php
r5651 r5715 33 33 return $GLOBALS['setup_info']['expressoCalendar']['currentver']; 34 34 } 35 36 $test[] = '1.001'; 37 function expressoCalendar_upgrade1_001() { 38 39 $oProc = $GLOBALS['phpgw_setup']->oProc; 40 41 $oProc->query("ALTER TABLE calendar_repeat ADD COLUMN dtstart bigint"); 42 $oProc->query('ALTER TABLE calendar_repeat ALTER COLUMN until DROP NOT NULL'); 43 44 $oProc->CreateTable('calendar_repeat_occurrence', array( 45 'fd' => array( 46 'id' => array( 'type' => 'auto', 'nullable' => False), 47 'occurrence' => array( 'type' => 'bigint','precision' => '16', 'nullable' => False), 48 'repeat_id' => array( 'type' => 'int', 'precision' => '8', 'nullable' => False) 49 ), 50 51 'pk' => array('id'), 52 'fk' => array('repeat_id'), 53 'ix' => array(), 54 'uc' => array() 55 ) 56 ); 57 58 $oProc->CreateTable('calendar_repeat_ranges', array( 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 ); 71 72 $oProc->query("ALTER TABLE calendar_repeat_occurrence ADD CONSTRAINT fk_calendar_repeat_to_calendar_repeat_occurrence FOREIGN KEY (repeat_id) REFERENCES calendar_repeat (id) MATCH SIMPLE ON UPDATE CASCADE ON DELETE CASCADE;"); 73 74 $GLOBALS['setup_info']['expressoCalendar']['currentver'] = '1.002'; 75 return $GLOBALS['setup_info']['expressoCalendar']['currentver']; 76 } 35 77 ?>
Note: See TracChangeset
for help on using the changeset viewer.