mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-10 05:48:30 +01:00
23 lines
477 B
PHP
23 lines
477 B
PHP
|
<?php
|
||
|
|
||
|
// Populate VCS passwords (which we copied from the old "VCS Password" table
|
||
|
// in the last migration) with new PHIDs.
|
||
|
|
||
|
$table = new PhabricatorAuthPassword();
|
||
|
$conn = $table->establishConnection('w');
|
||
|
|
||
|
foreach (new LiskMigrationIterator($table) as $row) {
|
||
|
if ($row->getPHID()) {
|
||
|
continue;
|
||
|
}
|
||
|
|
||
|
$new_phid = $row->generatePHID();
|
||
|
|
||
|
queryfx(
|
||
|
$conn,
|
||
|
'UPDATE %T SET phid = %s WHERE id = %d',
|
||
|
$table->getTableName(),
|
||
|
$new_phid,
|
||
|
$row->getID());
|
||
|
}
|