1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00
phorge-phorge/resources/sql/autopatches/20150515.project.mailkey.2.php
epriestley 72a896f772 Add missing mail keys to Projects
Ref T8216.

Auditors: btrahan
2015-05-16 06:13:27 -07:00

18 lines
417 B
PHP

<?php
$table = new PhabricatorProject();
$conn_w = $table->establishConnection('w');
$iterator = new LiskMigrationIterator($table);
foreach ($iterator as $project) {
$id = $project->getID();
echo pht('Adding mail key for project %d...', $id);
echo "\n";
queryfx(
$conn_w,
'UPDATE %T SET mailKey = %s WHERE id = %d',
$table->getTableName(),
Filesystem::readRandomCharacters(20),
$id);
}