1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-05 21:26:14 +01:00
phorge-phorge/resources/sql/patches/20130502.countdownrevamp2.php

24 lines
479 B
PHP
Raw Normal View History

<?php
echo pht('Giving countdowns PHIDs');
$table = new PhabricatorCountdown();
$table->openTransaction();
foreach (new LiskMigrationIterator($table) as $countdown) {
if ($countdown->getPHID()) {
continue;
}
echo '.';
queryfx(
$countdown->establishConnection('w'),
'UPDATE %T SET phid = %s WHERE id = %d',
$countdown->getTableName(),
$countdown->generatePHID(),
$countdown->getID());
}
$table->saveTransaction();
echo "\n".pht('Done.')."\n";