mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
8eec9e2c0e
Summary: Ref T9967 Test Plan: Ran migrations. Verified database populated properly with PHIDs (SELECT * FROM auth_sshkey;). Ran auth.querypublickeys conduit method to see phids show up Ran bin/remove destroy <phid>. Viewed the test key was gone. Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin Maniphest Tasks: T9967 Differential Revision: https://secure.phabricator.com/D14823
17 lines
352 B
PHP
17 lines
352 B
PHP
<?php
|
|
|
|
$table = new PhabricatorAuthSSHKey();
|
|
$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());
|
|
}
|