Changeset 6386
- Timestamp:
- 06/01/12 17:21:49 (11 years ago)
- Location:
- sandbox/2.4.1-3/expressoMail1_2/setup
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.4.1-3/expressoMail1_2/setup/setup.inc.php
r5988 r6386 13 13 $setup_info['expressoMail1_2']['name'] = 'expressoMail1_2'; 14 14 $setup_info['expressoMail1_2']['title'] = 'Expresso Mail'; 15 $setup_info['expressoMail1_2']['version'] = '2.4.6'; 16 $setup_info['expressoMail1_2']['app_order'] = 2; 17 $setup_info['expressoMail1_2']['tables'][] = 'phpgw_expressomail_contacts'; 15 $setup_info['expressoMail1_2']['version'] = '2.4.7'; 16 $setup_info['expressoMail1_2']['app_order'] = 2 18 17 $setup_info['expressoMail1_2']['tables'][] = 'phpgw_certificados'; 19 18 … … 22 21 $setup_info['expressoMail1_2']['tables'][] = 'expressomail_message_followupflag'; 23 22 $setup_info['expressoMail1_2']['tables'][] = 'expressomail_followupflag'; 23 $setup_info['expressoMail1_2']['tables'][] = 'expressomail_dynamic_contact'; 24 24 25 25 -
sandbox/2.4.1-3/expressoMail1_2/setup/tables_current.inc.php
r5981 r6386 12 12 'phpgw_expressomail_contacts' => array( 13 13 'fd' => array( 14 'id_owner' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false), 15 'data' => array( 'type' => 'text') 14 'id' => array('type' => 'auto','nullable' => False), 15 'owner' => array('type' => 'int','precision' => '16','nullable' => False), 16 'name' => array('type' => 'varchar','precision' => '100','nullable' => true), 17 'mail' => array('type' => 'varchar','precision' => '100','nullable' => False), 18 'timestamp' => array('type' => 'int','precision' => '16','nullable' => False), 16 19 ), 17 'pk' => array('id _owner'),20 'pk' => array('id'), 18 21 'fk' => array(), 19 22 'ix' => array(), 20 23 'uc' => array() 21 24 ), 25 22 26 'phpgw_certificados' => array( 23 27 'fd' => array( -
sandbox/2.4.1-3/expressoMail1_2/setup/tables_update.inc.php
r6185 r6386 263 263 return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 264 264 } 265 266 $test[] = '2.4.6'; 267 function expressoMail1_2_upgrade2_4_6() { 268 $oProc = $GLOBALS['phpgw_setup']->oProc; 269 270 //Criando nova tabela de contatos dinamicos 271 $oProc->CreateTable('expressomail_dynamic_contact',array( 272 'fd' => array( 273 'id' => array('type' => 'auto','nullable' => False), 274 'owner' => array('type' => 'int','precision' => '16','nullable' => False), 275 'name' => array('type' => 'varchar','precision' => '100','nullable' => true), 276 'mail' => array('type' => 'varchar','precision' => '100','nullable' => False), 277 'timestamp' => array('type' => 'int','precision' => '16','nullable' => False), 278 ), 279 'pk' => array('id'), 280 'fk' => array(), 281 'ix' => array(), 282 'uc' => array() 283 ) 284 ); 285 286 //Migra dados antigos para nova tabela 287 $oProc->query('SELECT * FROM phpgw_expressomail_contacts'); 288 $return = array(); 289 while($oProc->next_record()) 290 $return[$oProc->f('id_owner')] = $oProc->f('data'); 291 292 foreach ($return as $owner => &$value) { 293 $contacts = unserialize($value); 294 foreach ($contacts as &$contact) { 295 $info = explode('#', $contact['email']); 296 $oProc->query("INSERT INTO expressomail_dynamic_contact (owner, name ,mail , timestamp) values ('".$owner."', '".$info[0]."', '".$info[1]."', '".$contact['timestamp']."');"); 297 } 298 } 299 //////////////////////////////////////////////////////////// 300 301 //Deleta tabela antiga 302 $oProc->DropTable('phpgw_expressomail_contacts'); 303 304 305 $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '2.4.7'; 306 return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; 307 } 265 308 266 309 ?>
Note: See TracChangeset
for help on using the changeset viewer.