Changeset 6832 for sandbox/2.4.2-expresso1/expressoCalendar/setup
- Timestamp:
- 07/20/12 11:32:01 (12 years ago)
- Location:
- sandbox/2.4.2-expresso1/expressoCalendar/setup
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.4.2-expresso1/expressoCalendar/setup/default_records.inc.php
r5804 r6832 38 38 $oProc->query("ALTER TABLE calendar ALTER COLUMN dtstamp SET DEFAULT (date_part('epoch'::text, ('now'::text)::timestamp(3) with time zone) * (1000)::double precision);"); 39 39 40 $oProc->query("INSERT INTO calendar_object_type( \"id\", \"name\") VALUES ('1','VEVENT');"); 40 $oProc->query("INSERT INTO calendar_object_type( \"id\", \"name\") VALUES ('1','VEVENT');"); 41 $oProc->query("INSERT INTO calendar_object_type( \"id\", \"name\") VALUES ('2','TODO');"); 41 42 $oProc->query("INSERT INTO calendar_class( \"id\", \"name\") VALUES ('1','Public'),('2','Private'),('3','Confidential');"); 42 43 $oProc->query("INSERT INTO calendar_participant_status( \"id\", \"name\") VALUES ('1','CONFIRMED'),('2','TENTATIVE'),('3','CANCELLED'),('4','UNANSWERED'),('5', 'DELEGATED');"); -
sandbox/2.4.2-expresso1/expressoCalendar/setup/tables_current.inc.php
r6114 r6832 48 48 'duration' => array('type' => 'int', 'precision' => '8' ,'nullable' => True), 49 49 'tzid' => array('type' => 'varchar', 'precision' => '50' ,'nullable' => True), 50 'type' => array('type' => 'int', 'precision' => '2' ,'nullable' => false, 'default' => 0), 50 51 'dtstamp' => array('type' => 'int', 'precision' => '8' ,'nullable' => True) 51 52 ), … … 277 278 'msg_alarms' => array( 'type' => 'text', 'nullable' => True), 278 279 'font_color' => array( 'type' => 'varchar','precision' => '6', 'nullable' => True), 279 280 'border_color' => array( 'type' => 'varchar','precision' => '6', 'nullable' => True)281 280 'background_color' => array( 'type' => 'varchar','precision' => '6', 'nullable' => True), 281 'border_color' => array( 'type' => 'varchar','precision' => '6', 'nullable' => True), 282 'type' => array('type' => 'int', 'precision' => '2' ,'nullable' => false, 'default' => 0) 282 283 ), 283 284 'pk' => array('id'), -
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.