mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 09:12:41 +01:00
27 lines
609 B
PHP
27 lines
609 B
PHP
|
<?php
|
||
|
|
||
|
$projects = id(new PhabricatorRepositoryArcanistProjectQuery())
|
||
|
->setViewer(PhabricatorUser::getOmnipotentUser())
|
||
|
->needRepositories(true)
|
||
|
->execute();
|
||
|
|
||
|
$table = new PhabricatorRepositorySymbol();
|
||
|
$conn_w = $table->establishConnection('w');
|
||
|
|
||
|
foreach ($projects as $project) {
|
||
|
$repo = $project->getRepository();
|
||
|
|
||
|
if (!$repo) {
|
||
|
continue;
|
||
|
}
|
||
|
|
||
|
echo pht("Migrating symbols for '%s' project...\n", $project->getName());
|
||
|
|
||
|
queryfx(
|
||
|
$conn_w,
|
||
|
'UPDATE %T SET repositoryPHID = %s WHERE arcanistProjectID = %d',
|
||
|
$table->getTableName(),
|
||
|
$repo->getPHID(),
|
||
|
$project->getID());
|
||
|
}
|