Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/resources/sql/autopatches/20140205.cal.3.phid-mig.php
12250 views
1
<?php
2
3
$table = new PhabricatorCalendarEvent();
4
$conn_w = $table->establishConnection('w');
5
6
echo pht('Assigning PHIDs to events...')."\n";
7
foreach (new LiskMigrationIterator($table) as $event) {
8
$id = $event->getID();
9
10
echo pht('Updating event %d...', $id)."\n";
11
if ($event->getPHID()) {
12
continue;
13
}
14
15
queryfx(
16
$conn_w,
17
'UPDATE %T SET phid = %s WHERE id = %d',
18
$table->getTableName(),
19
$table->generatePHID(),
20
$id);
21
}
22
echo pht('Done.')."\n";
23
24