mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-29 17:00:59 +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());
|
||
|
}
|