@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.

Add generic "attributes" storage to inline comment tables

Summary: Ref T13513. This plans for "currently editing", character range comments, code suggestions, document engine tracking. And absolutely nothing else.

Test Plan:
- Ran `bin/storage upgrade -f`, got a clean upgrade.
- Created and submitted some inline comments; nothing exploded.

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13513

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

+21
+2
resources/sql/autopatches/20200428.inline.01.differential.column.sql
··· 1 + ALTER TABLE {$NAMESPACE}_differential.differential_transaction_comment 2 + ADD attributes LONGTEXT NOT NULL COLLATE {$COLLATE_TEXT};
+2
resources/sql/autopatches/20200428.inline.02.diffusion.column.sql
··· 1 + ALTER TABLE {$NAMESPACE}_audit.audit_transaction_comment 2 + ADD attributes LONGTEXT NOT NULL COLLATE {$COLLATE_TEXT};
+2
resources/sql/autopatches/20200428.inline.03.differential.value.sql
··· 1 + UPDATE {$NAMESPACE}_differential.differential_transaction_comment 2 + SET attributes = '{}' WHERE attributes = '';
+2
resources/sql/autopatches/20200428.inline.04.diffusion.value.sql
··· 1 + UPDATE {$NAMESPACE}_audit.audit_transaction_comment 2 + SET attributes = '{}' WHERE attributes = '';
+5
src/applications/audit/storage/PhabricatorAuditTransactionComment.php
··· 12 12 protected $hasReplies = 0; 13 13 protected $replyToCommentPHID; 14 14 protected $legacyCommentID; 15 + protected $attributes = array(); 15 16 16 17 private $replyToComment = self::ATTACHABLE; 17 18 ··· 53 54 'columns' => array('legacyCommentID'), 54 55 ), 55 56 ) + $config[self::CONFIG_KEY_SCHEMA]; 57 + 58 + $config[self::CONFIG_SERIALIZATION] = array( 59 + 'attributes' => self::SERIALIZATION_JSON, 60 + ) + idx($config, self::CONFIG_SERIALIZATION, array()); 56 61 57 62 return $config; 58 63 }
+8
src/applications/differential/storage/DifferentialTransactionComment.php
··· 11 11 protected $fixedState; 12 12 protected $hasReplies = 0; 13 13 protected $replyToCommentPHID; 14 + protected $attributes = array(); 14 15 15 16 private $replyToComment = self::ATTACHABLE; 16 17 private $isHidden = self::ATTACHABLE; ··· 32 33 33 34 protected function getConfiguration() { 34 35 $config = parent::getConfiguration(); 36 + 35 37 $config[self::CONFIG_COLUMN_SCHEMA] = array( 36 38 'revisionPHID' => 'phid?', 37 39 'changesetID' => 'id?', ··· 42 44 'hasReplies' => 'bool', 43 45 'replyToCommentPHID' => 'phid?', 44 46 ) + $config[self::CONFIG_COLUMN_SCHEMA]; 47 + 45 48 $config[self::CONFIG_KEY_SCHEMA] = array( 46 49 'key_draft' => array( 47 50 'columns' => array('authorPHID', 'transactionPHID'), ··· 53 56 'columns' => array('revisionPHID'), 54 57 ), 55 58 ) + $config[self::CONFIG_KEY_SCHEMA]; 59 + 60 + $config[self::CONFIG_SERIALIZATION] = array( 61 + 'attributes' => self::SERIALIZATION_JSON, 62 + ) + idx($config, self::CONFIG_SERIALIZATION, array()); 63 + 56 64 return $config; 57 65 } 58 66