mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-04 04:32:43 +01:00
22 lines
445 B
PHP
22 lines
445 B
PHP
|
<?php
|
||
|
|
||
|
echo "Adding mailkeys to events.\n";
|
||
|
|
||
|
$table = new PhabricatorCalendarEvent();
|
||
|
$conn_w = $table->establishConnection('w');
|
||
|
$iterator = new LiskMigrationIterator($table);
|
||
|
foreach ($iterator as $event) {
|
||
|
$id = $event->getID();
|
||
|
|
||
|
echo "Populating event {$id}...\n";
|
||
|
|
||
|
queryfx(
|
||
|
$conn_w,
|
||
|
'UPDATE %T SET mailKey = %s WHERE id = %d',
|
||
|
$table->getTableName(),
|
||
|
Filesystem::readRandomCharacters(20),
|
||
|
$id);
|
||
|
}
|
||
|
|
||
|
echo "Done.\n";
|