[ Index ] |
|
Code source de eGroupWare 1.2.106-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 \**************************************************************************/ 11 12 /* $Id: tables_update.inc.php 20295 2006-02-15 12:31:25Z $ */ 13 14 $test[] = '0.8.2'; 15 function felamimail_upgrade0_8_2() 16 { 17 $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_felamimail_cache','to_name',array('type' => 'varchar', 'precision' => 120)); 18 $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_felamimail_cache','to_address',array('type' => 'varchar', 'precision' => 120)); 19 20 $GLOBALS['setup_info']['felamimail']['currentver'] = '0.8.3'; 21 return $GLOBALS['setup_info']['felamimail']['currentver']; 22 } 23 24 $test[] = '0.8.3'; 25 function felamimail_upgrade0_8_3() 26 { 27 28 $GLOBALS['egw_setup']->oProc->AddColumn('phpgw_felamimail_cache','attachments',array('type' => 'varchar', 'precision' => 120)); 29 30 $GLOBALS['setup_info']['felamimail']['currentver'] = '0.8.4'; 31 return $GLOBALS['setup_info']['felamimail']['currentver']; 32 } 33 34 $test[] = '0.8.4'; 35 function felamimail_upgrade0_8_4() 36 { 37 $GLOBALS['setup_info']['felamimail']['currentver'] = '0.9.0'; 38 return $GLOBALS['setup_info']['felamimail']['currentver']; 39 } 40 41 $test[] = '0.9.0'; 42 function felamimail_upgrade0_9_0() 43 { 44 $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_felamimail_folderstatus', 'accountname', array('type' => 'varchar', 'precision' => 200, 'nullable' => false)); 45 $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_felamimail_cache', 'accountname', array('type' => 'varchar', 'precision' => 200, 'nullable' => false)); 46 47 $GLOBALS['setup_info']['felamimail']['currentver'] = '0.9.1'; 48 return $GLOBALS['setup_info']['felamimail']['currentver']; 49 } 50 51 $test[] = '0.9.1'; 52 function felamimail_upgrade0_9_1() 53 { 54 $GLOBALS['setup_info']['felamimail']['currentver'] = '0.9.2'; 55 return $GLOBALS['setup_info']['felamimail']['currentver']; 56 } 57 58 $test[] = '0.9.2'; 59 function felamimail_upgrade0_9_2() 60 { 61 $GLOBALS['egw_setup']->oProc->CreateTable('phpgw_felamimail_displayfilter', 62 Array( 63 'fd' => array( 64 'accountid' => array('type' => 'int', 'precision' => 4, 'nullable' => false), 65 'filter' => array('type' => 'text') 66 ), 67 'pk' => array('accountid'), 68 'fk' => array(), 69 'ix' => array(), 70 'uc' => array() 71 ) 72 73 ); 74 75 $GLOBALS['setup_info']['felamimail']['currentver'] = '0.9.3'; 76 return $GLOBALS['setup_info']['felamimail']['currentver']; 77 } 78 79 $test[] = '0.9.3'; 80 function felamimail_upgrade0_9_3() 81 { 82 $GLOBALS['egw_setup']->oProc->DropTable('phpgw_felamimail_cache'); 83 $GLOBALS['egw_setup']->oProc->query('delete from phpgw_felamimail_folderstatus',__LINE__,__FILE__); 84 $GLOBALS['egw_setup']->oProc->CreateTable('phpgw_felamimail_cache', 85 Array( 86 'fd' => array( 87 'accountid' => array('type' => 'int', 'precision' => 4, 'nullable' => false), 88 'hostname' => array('type' => 'varchar', 'precision' => 60, 'nullable' => false), 89 'accountname' => array('type' => 'varchar', 'precision' => 200, 'nullable' => false), 90 'foldername' => array('type' => 'varchar', 'precision' => 200, 'nullable' => false), 91 'uid' => array('type' => 'int', 'precision' => 4, 'nullable' => false), 92 'subject' => array('type' => 'text'), 93 'striped_subject'=> array('type' => 'text'), 94 'sender_name' => array('type' => 'varchar', 'precision' => 120), 95 'sender_address'=> array('type' => 'varchar', 'precision' => 120), 96 'to_name' => array('type' => 'varchar', 'precision' => 120), 97 'to_address' => array('type' => 'varchar', 'precision' => 120), 98 'date' => array('type' => 'varchar', 'precision' => 120), 99 'size' => array('type' => 'int', 'precision' => 4), 100 'attachments' => array('type' => 'varchar', 'precision' =>120) 101 ), 102 'pk' => array('accountid','hostname','accountname','foldername','uid'), 103 'fk' => array(), 104 'ix' => array(), 105 'uc' => array() 106 ) 107 ); 108 109 $GLOBALS['setup_info']['felamimail']['currentver'] = '0.9.4'; 110 return $GLOBALS['setup_info']['felamimail']['currentver']; 111 } 112 113 114 115 $test[] = '0.9.4'; 116 function felamimail_upgrade0_9_4() 117 { 118 $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_felamimail_cache','accountname',array( 119 'type' => 'varchar', 120 'precision' => '25', 121 'nullable' => False 122 )); 123 $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_felamimail_cache','date',array( 124 'type' => 'int', 125 'precision' => '8' 126 )); 127 128 $GLOBALS['setup_info']['felamimail']['currentver'] = '0.9.5'; 129 return $GLOBALS['setup_info']['felamimail']['currentver']; 130 } 131 132 133 $test[] = '0.9.5'; 134 function felamimail_upgrade0_9_5() 135 { 136 $GLOBALS['setup_info']['felamimail']['currentver'] = '1.0.0'; 137 return $GLOBALS['setup_info']['felamimail']['currentver']; 138 } 139 140 141 $test[] = '1.0.0'; 142 function felamimail_upgrade1_0_0() 143 { 144 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_cache','accountid','fmail_accountid'); 145 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_cache','hostname','fmail_hostname'); 146 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_cache','accountname','fmail_accountname'); 147 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_cache','foldername','fmail_foldername'); 148 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_cache','uid','fmail_uid'); 149 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_cache','subject','fmail_subject'); 150 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_cache','striped_subject','fmail_striped_subject'); 151 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_cache','sender_name','fmail_sender_name'); 152 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_cache','sender_address','fmail_sender_address'); 153 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_cache','to_name','fmail_to_name'); 154 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_cache','to_address','fmail_to_address'); 155 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_cache','date','fmail_date'); 156 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_cache','size','fmail_size'); 157 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_cache','attachments','fmail_attachments'); 158 159 $GLOBALS['setup_info']['felamimail']['currentver'] = '1.0.0.001'; 160 return $GLOBALS['setup_info']['felamimail']['currentver']; 161 } 162 163 164 $test[] = '1.0.0.001'; 165 function felamimail_upgrade1_0_0_001() 166 { 167 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_folderstatus','accountid','fmail_accountid'); 168 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_folderstatus','hostname','fmail_hostname'); 169 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_folderstatus','accountname','fmail_accountname'); 170 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_folderstatus','foldername','fmail_foldername'); 171 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_folderstatus','messages','fmail_messages'); 172 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_folderstatus','recent','fmail_recent'); 173 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_folderstatus','unseen','fmail_unseen'); 174 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_folderstatus','uidnext','fmail_uidnext'); 175 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_folderstatus','uidvalidity','fmail_uidvalidity'); 176 177 $GLOBALS['setup_info']['felamimail']['currentver'] = '1.0.0.002'; 178 return $GLOBALS['setup_info']['felamimail']['currentver']; 179 } 180 181 182 $test[] = '1.0.0.002'; 183 function felamimail_upgrade1_0_0_002() 184 { 185 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_displayfilter','accountid','fmail_filter_accountid'); 186 $GLOBALS['egw_setup']->oProc->RenameColumn('phpgw_felamimail_displayfilter','filter','fmail_filter_data'); 187 188 $GLOBALS['setup_info']['felamimail']['currentver'] = '1.0.0.003'; 189 return $GLOBALS['setup_info']['felamimail']['currentver']; 190 } 191 192 $test[] = '1.0.0.003'; 193 function felamimail_upgrade1_0_0_003() 194 { 195 $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_felamimail_cache', 'fmail_accountname', array('type' => 'varchar','precision' => '200','nullable' => False)); 196 197 $GLOBALS['setup_info']['felamimail']['currentver'] = '1.0.0.004'; 198 return $GLOBALS['setup_info']['felamimail']['currentver']; 199 } 200 201 202 203 $test[] = '1.0.0.004'; 204 function felamimail_upgrade1_0_0_004() 205 { 206 // index was to big for mysql with charset utf8 (max 1000byte = 333 utf8 chars) 207 $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_felamimail_cache','fmail_accountname',array( 208 'type' => 'varchar', 209 'precision' => '128', 210 'nullable' => False 211 )); 212 $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_felamimail_cache','fmail_foldername',array( 213 'type' => 'varchar', 214 'precision' => '128', 215 'nullable' => False 216 )); 217 218 $GLOBALS['egw_setup']->oProc->RenameTable('phpgw_felamimail_cache','egw_felamimail_cache'); 219 220 $GLOBALS['setup_info']['felamimail']['currentver'] = '1.0.0.005'; 221 return $GLOBALS['setup_info']['felamimail']['currentver']; 222 } 223 224 225 $test[] = '1.0.0.005'; 226 function felamimail_upgrade1_0_0_005() 227 { 228 // index was to big for mysql with charset utf8 (max 1000byte = 333 utf8 chars) 229 $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_felamimail_folderstatus','fmail_accountname',array( 230 'type' => 'varchar', 231 'precision' => '128', 232 'nullable' => False 233 )); 234 $GLOBALS['egw_setup']->oProc->AlterColumn('phpgw_felamimail_folderstatus','fmail_foldername',array( 235 'type' => 'varchar', 236 'precision' => '128', 237 'nullable' => False 238 )); 239 240 $GLOBALS['egw_setup']->oProc->RenameTable('phpgw_felamimail_folderstatus','egw_felamimail_folderstatus'); 241 $GLOBALS['egw_setup']->oProc->RenameTable('phpgw_felamimail_displayfilter','egw_felamimail_displayfilter'); 242 243 $GLOBALS['setup_info']['felamimail']['currentver'] = '1.0.0.006'; 244 return $GLOBALS['setup_info']['felamimail']['currentver']; 245 } 246 247 248 $test[] = '1.0.0.006'; 249 function felamimail_upgrade1_0_0_006() 250 { 251 return $GLOBALS['setup_info']['felamimail']['currentver'] = '1.2'; 252 } 253 254 // next version should be 1.2.001 255 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |