2014-02-06 19:10:43 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$table = new PhabricatorCalendarEvent();
|
|
|
|
$conn_w = $table->establishConnection('w');
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Assigning PHIDs to events...')."\n";
|
2014-02-06 19:10:43 +01:00
|
|
|
foreach (new LiskMigrationIterator($table) as $event) {
|
|
|
|
$id = $event->getID();
|
|
|
|
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Updating event %d...', $id)."\n";
|
2014-02-06 19:10:43 +01:00
|
|
|
if ($event->getPHID()) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
|
|
|
queryfx(
|
|
|
|
$conn_w,
|
|
|
|
'UPDATE %T SET phid = %s WHERE id = %d',
|
|
|
|
$table->getTableName(),
|
|
|
|
$table->generatePHID(),
|
|
|
|
$id);
|
|
|
|
}
|
2015-05-22 09:27:56 +02:00
|
|
|
echo pht('Done.')."\n";
|