[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 $conn_w = id(new PhabricatorRepository())->establishConnection('w'); 4 5 echo "Adding transaction log event groups...\n"; 6 7 $logs = queryfx_all( 8 $conn_w, 9 'SELECT * FROM %T GROUP BY transactionKey ORDER BY id ASC', 10 'repository_pushlog'); 11 foreach ($logs as $log) { 12 $id = $log['id']; 13 echo "Migrating log {$id}...\n"; 14 if ($log['pushEventPHID']) { 15 continue; 16 } 17 18 $event_phid = id(new PhabricatorRepositoryPushEvent())->generatePHID(); 19 20 queryfx( 21 $conn_w, 22 'INSERT INTO %T (phid, repositoryPHID, epoch, pusherPHID, remoteAddress, 23 remoteProtocol, rejectCode, rejectDetails) 24 VALUES (%s, %s, %d, %s, %d, %s, %d, %s)', 25 'repository_pushevent', 26 $event_phid, 27 $log['repositoryPHID'], 28 $log['epoch'], 29 $log['pusherPHID'], 30 $log['remoteAddress'], 31 $log['remoteProtocol'], 32 $log['rejectCode'], 33 $log['rejectDetails']); 34 35 queryfx( 36 $conn_w, 37 'UPDATE %T SET pushEventPHID = %s WHERE transactionKey = %s', 38 'repository_pushlog', 39 $event_phid, 40 $log['transactionKey']); 41 } 42 43 echo "Done.\n";
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |