@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove the onboard "mailKey" from Pholio Mocks

Summary: Depends on D19921. Ref T11351. Ref T13065. Update Pholio to use the shared mail infrastructure. See D19670 for a previous change in this vein.

Test Plan: Ran upgrade, spot-checked that everything made it into the new table alive.

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13065, T11351

Differential Revision: https://secure.phabricator.com/D19922

+32 -16
+28
resources/sql/autopatches/20181220.pholio.01.mailkey.php
··· 1 + <?php 2 + 3 + $mock_table = new PholioMock(); 4 + $mock_conn = $mock_table->establishConnection('w'); 5 + 6 + $properties_table = new PhabricatorMetaMTAMailProperties(); 7 + $conn = $properties_table->establishConnection('w'); 8 + 9 + $iterator = new LiskRawMigrationIterator( 10 + $mock_conn, 11 + $mock_table->getTableName()); 12 + 13 + foreach ($iterator as $row) { 14 + queryfx( 15 + $conn, 16 + 'INSERT IGNORE INTO %T 17 + (objectPHID, mailProperties, dateCreated, dateModified) 18 + VALUES 19 + (%s, %s, %d, %d)', 20 + $properties_table->getTableName(), 21 + $row['phid'], 22 + phutil_json_encode( 23 + array( 24 + 'mailKey' => $row['mailKey'], 25 + )), 26 + PhabricatorTime::getNow(), 27 + PhabricatorTime::getNow()); 28 + }
+2
resources/sql/autopatches/20181220.pholio.02.dropmailkey.sql
··· 1 + ALTER TABLE {$NAMESPACE}_pholio.pholio_mock 2 + DROP mailKey;
+2 -16
src/applications/pholio/storage/PholioMock.php
··· 25 25 protected $name; 26 26 protected $description; 27 27 protected $coverPHID; 28 - protected $mailKey; 29 28 protected $status; 30 29 protected $spacePHID; 31 30 ··· 65 64 self::CONFIG_COLUMN_SCHEMA => array( 66 65 'name' => 'text128', 67 66 'description' => 'text', 68 - 'mailKey' => 'bytes20', 69 67 'status' => 'text12', 70 68 ), 71 69 self::CONFIG_KEY_SCHEMA => array( 72 - 'key_phid' => null, 73 - 'phid' => array( 74 - 'columns' => array('phid'), 75 - 'unique' => true, 76 - ), 77 70 'authorPHID' => array( 78 71 'columns' => array('authorPHID'), 79 72 ), ··· 81 74 ) + parent::getConfiguration(); 82 75 } 83 76 84 - public function generatePHID() { 85 - return PhabricatorPHID::generateNewPHID('MOCK'); 86 - } 87 - 88 - public function save() { 89 - if (!$this->getMailKey()) { 90 - $this->setMailKey(Filesystem::readRandomCharacters(20)); 91 - } 92 - return parent::save(); 77 + public function getPHIDType() { 78 + return PholioMockPHIDType::TYPECONST; 93 79 } 94 80 95 81 public function attachImages(array $images) {