mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-23 07:12:41 +01:00
2a203fbab1
Summary: Ref T9952. See discussion there. This change is primarily aimed at letting me build a typeahead of branches in a repository so that we can land to arbitrary branches a few diffs from now. Test Plan: - Ran migrations. - Verified database populated properly with PHIDs (`SELECT * FROM repository_refcursor;`). - Ran `bin/repository update`. - Viewed a Git repository in Diffusion. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9952 Differential Revision: https://secure.phabricator.com/D14731
17 lines
361 B
PHP
17 lines
361 B
PHP
<?php
|
|
|
|
$table = new PhabricatorRepositoryRefCursor();
|
|
$conn_w = $table->establishConnection('w');
|
|
|
|
foreach (new LiskMigrationIterator($table) as $cursor) {
|
|
if (strlen($cursor->getPHID())) {
|
|
continue;
|
|
}
|
|
|
|
queryfx(
|
|
$conn_w,
|
|
'UPDATE %T SET phid = %s WHERE id = %d',
|
|
$table->getTableName(),
|
|
$table->generatePHID(),
|
|
$cursor->getID());
|
|
}
|