1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 21:02:41 +01:00
phorge-phorge/resources/sql/patches/20130502.countdownrevamp2.php
Lauri-Henrik Jalonen 271d6605a9 Countdown revamp
Summary:
countdown_timer table named to countdown.
datepoint and related stuff renamed to epoch.
Countdowns now have phids.
Various UI items changed from timer to countdown.

Test Plan: Did run storage upgrade and added some countdowns.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, AnhNhan

Maniphest Tasks: T2624

Differential Revision: https://secure.phabricator.com/D5812
2013-05-03 15:53:36 -07:00

23 lines
463 B
PHP

<?php
echo "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 "\nDone.\n";