1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-11 16:16:14 +01:00
phorge-phorge/resources/sql/autopatches/20150501.calendar.2.reply.php

22 lines
477 B
PHP
Raw Normal View History

<?php
echo pht('Adding %s to events.', 'mailkeys')."\n";
$table = new PhabricatorCalendarEvent();
$conn_w = $table->establishConnection('w');
$iterator = new LiskMigrationIterator($table);
foreach ($iterator as $event) {
$id = $event->getID();
echo pht('Populating event %d...', $id)."\n";
queryfx(
$conn_w,
'UPDATE %T SET mailKey = %s WHERE id = %d',
$table->getTableName(),
Filesystem::readRandomCharacters(20),
$id);
}
echo pht('Done.')."\n";