Add mail/feed support to PhamePost
Summary: Allows feed stories and mail for new Phame Posts. Test Plan: Write Post, Get Mail Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D14426
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE {$NAMESPACE}_phame.phame_post
|
||||
ADD mailKey binary(20) NOT NULL;
|
||||
18
resources/sql/autopatches/20151106.phame.post.mailkey.2.php
Normal file
18
resources/sql/autopatches/20151106.phame.post.mailkey.2.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
$table = new PhamePost();
|
||||
$conn_w = $table->establishConnection('w');
|
||||
$iterator = new LiskMigrationIterator($table);
|
||||
foreach ($iterator as $post) {
|
||||
$id = $post->getID();
|
||||
|
||||
echo pht('Adding mail key for Post %d...', $id);
|
||||
echo "\n";
|
||||
|
||||
queryfx(
|
||||
$conn_w,
|
||||
'UPDATE %T SET mailKey = %s WHERE id = %d',
|
||||
$table->getTableName(),
|
||||
Filesystem::readRandomCharacters(20),
|
||||
$id);
|
||||
}
|
||||
Reference in New Issue
Block a user