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
This commit is contained in:
Chad Little
2015-07-25 13:34:43 -07:00
parent 6337fa99a3
commit 82edde8876
8 changed files with 122 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_badges.badges_badge
ADD mailKey binary(20) NOT NULL;

View File

@@ -0,0 +1,18 @@
<?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);
}