1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 00:02:41 +01:00
phorge-phorge/resources/sql/autopatches/20150725.badges.mailkey.2.php
Chad Little 82edde8876 Add MAILTAGs to Badges
Summary: Still doesn't mail yet, but the settings now show up.

Test Plan: View email settings, see Badges options.

Reviewers: eadler, epriestley

Reviewed By: eadler, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13712
2015-07-25 13:34:43 -07:00

18 lines
415 B
PHP

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