Add mailKeys to Countdown

Summary: Adds mailkeys and reply handler support

Test Plan: Edit Countdown, New Countdown, no errors.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D13713
This commit is contained in:
Chad Little
2015-07-25 15:47:07 -07:00
parent 82edde8876
commit a962aeaf85
6 changed files with 66 additions and 1 deletions

View File

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

View File

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