mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +01:00
parent
7c3a7f47cd
commit
b7ccc77728
1 changed files with 4 additions and 27 deletions
|
@ -1,29 +1,6 @@
|
|||
<?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']);
|
||||
}
|
||||
// NOTE: This migration moved existing symbols from Arcanist Projects to
|
||||
// Repositories. It stopped running cleanly about two months later, after
|
||||
// Spaces were introduced. Since this data is not important and can be
|
||||
// trivially regenerated, just stop running the migration. See T8691.
|
||||
|
|
Loading…
Reference in a new issue