- Timestamp:
- 06/12/12 17:28:36 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.4.1-3/expressoMail1_2/setup/tables_update.inc.php
r6386 r6468 275 275 'name' => array('type' => 'varchar','precision' => '100','nullable' => true), 276 276 'mail' => array('type' => 'varchar','precision' => '100','nullable' => False), 277 'number_of_messages' => array('type' => 'int','precision' => '16','nullable' => False), 277 278 'timestamp' => array('type' => 'int','precision' => '16','nullable' => False), 278 279 ), … … 284 285 ); 285 286 287 /* Cria um indice unico para um owner e mail para nao ocorrer duplicidade em e-mails para um mesmo owner */ 288 $oProc->query("ALTER TABLE expressomail_dynamic_contact ADD CONSTRAINT owner_mail UNIQUE (owner, mail)"); 289 286 290 //Migra dados antigos para nova tabela 287 291 $oProc->query('SELECT * FROM phpgw_expressomail_contacts'); … … 294 298 foreach ($contacts as &$contact) { 295 299 $info = explode('#', $contact['email']); 296 $oProc->query("INSERT INTO expressomail_dynamic_contact (owner, name ,mail , timestamp) values ('".$owner."', '".$info[0]."', '".$info[1]."', '".$contact['timestamp']."');");300 $oProc->query("INSERT INTO expressomail_dynamic_contact (owner, name ,mail , number_of_messages ,timestamp) values ('".$owner."', '".$info[0]."', '".$info[1]."', 1, '".$contact['timestamp']."');"); 297 301 } 298 302 }
Note: See TracChangeset
for help on using the changeset viewer.