Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F107718857
20150503.repositorysymbols.2.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Apr 10, 01:14
Size
667 B
Mime Type
text/x-php
Expires
Sat, Apr 12, 01:14 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25464506
Attached To
rPH Phabricator
20150503.repositorysymbols.2.php
View Options
<?php
$table
=
new
PhabricatorRepositorySymbol
();
$conn_w
=
$table
->
establishConnection
(
'w'
);
$projects
=
queryfx_all
(
$conn_w
,
'SELECT * FROM %T'
,
'repository_arcanistproject'
);
foreach
(
$projects
as
$project
)
{
$repo
=
id
(
new
PhabricatorRepositoryQuery
())
->
setViewer
(
PhabricatorUser
::
getOmnipotentUser
())
->
withIDs
(
array
(
$project
[
'repositoryID'
]))
->
executeOne
();
if
(!
$repo
)
{
continue
;
}
echo
pht
(
"Migrating symbols for '%s' project...
\n
"
,
$project
[
'name'
]);
queryfx
(
$conn_w
,
'UPDATE %T SET repositoryPHID = %s WHERE arcanistProjectID = %d'
,
$table
->
getTableName
(),
$repo
->
getPHID
(),
$project
[
'id'
]);
}
Event Timeline
Log In to Comment