Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F679967
20140325.push.3.groups.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
20140325.push.3.groups.php
View Options
<?php
$conn_w
=
id
(
new
PhabricatorRepository
())->
establishConnection
(
'w'
);
echo
pht
(
'Adding transaction log event groups...'
).
"
\n
"
;
$logs
=
queryfx_all
(
$conn_w
,
'SELECT * FROM %T GROUP BY transactionKey ORDER BY id ASC'
,
'repository_pushlog'
);
foreach
(
$logs
as
$log
)
{
$id
=
$log
[
'id'
];
echo
pht
(
'Migrating log %d...'
,
$id
).
"
\n
"
;
if
(
$log
[
'pushEventPHID'
])
{
continue
;
}
$event_phid
=
id
(
new
PhabricatorRepositoryPushEvent
())->
generatePHID
();
queryfx
(
$conn_w
,
'INSERT INTO %T (phid, repositoryPHID, epoch, pusherPHID, remoteAddress,
remoteProtocol, rejectCode, rejectDetails)
VALUES (%s, %s, %d, %s, %d, %s, %d, %s)'
,
'repository_pushevent'
,
$event_phid
,
$log
[
'repositoryPHID'
],
$log
[
'epoch'
],
$log
[
'pusherPHID'
],
$log
[
'remoteAddress'
],
$log
[
'remoteProtocol'
],
$log
[
'rejectCode'
],
$log
[
'rejectDetails'
]);
queryfx
(
$conn_w
,
'UPDATE %T SET pushEventPHID = %s WHERE transactionKey = %s'
,
'repository_pushlog'
,
$event_phid
,
$log
[
'transactionKey'
]);
}
echo
pht
(
'Done.'
).
"
\n
"
;
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, May 27, 8:54 AM (1 d, 15 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
170475
Default Alt Text
20140325.push.3.groups.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment