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

Provide generalized custom field storage and custom field indexes in Maniphest

Summary: Ref T418. Depends on D6992. This adds index and value storage for Maniphest custom fields.

Test Plan: Ran storage upgrade.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T418

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

+84
+29
resources/sql/patches/20130915.maniphestcustom.sql
··· 1 + CREATE TABLE {$NAMESPACE}_maniphest.maniphest_customfieldstorage ( 2 + id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 3 + objectPHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 4 + fieldIndex CHAR(12) NOT NULL COLLATE utf8_bin, 5 + fieldValue LONGTEXT NOT NULL, 6 + UNIQUE KEY (objectPHID, fieldIndex) 7 + ) ENGINE=InnoDB, COLLATE utf8_general_ci; 8 + 9 + CREATE TABLE {$NAMESPACE}_maniphest.maniphest_customfieldstringindex ( 10 + id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 11 + objectPHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 12 + indexKey VARCHAR(12) NOT NULL COLLATE utf8_bin, 13 + indexValue LONGTEXT NOT NULL COLLATE utf8_general_ci, 14 + 15 + KEY `key_join` (objectPHID, indexKey, indexValue(64)), 16 + KEY `key_find` (indexKey, indexValue(64)) 17 + 18 + ) ENGINE=InnoDB, COLLATE utf8_general_ci; 19 + 20 + CREATE TABLE {$NAMESPACE}_maniphest.maniphest_customfieldnumericindex ( 21 + id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 22 + objectPHID VARCHAR(64) NOT NULL COLLATE utf8_bin, 23 + indexKey VARCHAR(12) NOT NULL COLLATE utf8_bin, 24 + indexValue BIGINT NOT NULL, 25 + 26 + KEY `key_join` (objectPHID, indexKey, indexValue), 27 + KEY `key_find` (indexKey, indexValue) 28 + 29 + ) ENGINE=InnoDB, COLLATE utf8_general_ci;
+6
src/__phutil_library_map__.php
··· 691 691 'ManiphestController' => 'applications/maniphest/controller/ManiphestController.php', 692 692 'ManiphestCreateMailReceiver' => 'applications/maniphest/mail/ManiphestCreateMailReceiver.php', 693 693 'ManiphestCustomField' => 'applications/maniphest/field/ManiphestCustomField.php', 694 + 'ManiphestCustomFieldNumericIndex' => 'applications/maniphest/storage/ManiphestCustomFieldNumericIndex.php', 695 + 'ManiphestCustomFieldStorage' => 'applications/maniphest/storage/ManiphestCustomFieldStorage.php', 696 + 'ManiphestCustomFieldStringIndex' => 'applications/maniphest/storage/ManiphestCustomFieldStringIndex.php', 694 697 'ManiphestDAO' => 'applications/maniphest/storage/ManiphestDAO.php', 695 698 'ManiphestDefaultTaskExtensions' => 'applications/maniphest/extensions/ManiphestDefaultTaskExtensions.php', 696 699 'ManiphestEdgeEventListener' => 'applications/maniphest/event/ManiphestEdgeEventListener.php', ··· 2755 2758 'ManiphestController' => 'PhabricatorController', 2756 2759 'ManiphestCreateMailReceiver' => 'PhabricatorMailReceiver', 2757 2760 'ManiphestCustomField' => 'PhabricatorCustomField', 2761 + 'ManiphestCustomFieldNumericIndex' => 'PhabricatorCustomFieldNumericIndexStorage', 2762 + 'ManiphestCustomFieldStorage' => 'PhabricatorCustomFieldStorage', 2763 + 'ManiphestCustomFieldStringIndex' => 'PhabricatorCustomFieldStringIndexStorage', 2758 2764 'ManiphestDAO' => 'PhabricatorLiskDAO', 2759 2765 'ManiphestDefaultTaskExtensions' => 'ManiphestTaskExtensions', 2760 2766 'ManiphestEdgeEventListener' => 'PhutilEventListener',
+12
src/applications/maniphest/field/ManiphestCustomField.php
··· 3 3 abstract class ManiphestCustomField 4 4 extends PhabricatorCustomField { 5 5 6 + public function newStorageObject() { 7 + return new ManiphestCustomFieldStorage(); 8 + } 9 + 10 + protected function newStringIndexStorage() { 11 + return new ManiphestCustomFieldStringIndex(); 12 + } 13 + 14 + protected function newNumericIndexStorage() { 15 + return new ManiphestCustomFieldNumericIndex(); 16 + } 17 + 6 18 }
+11
src/applications/maniphest/storage/ManiphestCustomFieldNumericIndex.php
··· 1 + <?php 2 + 3 + final class ManiphestCustomFieldNumericIndex 4 + extends PhabricatorCustomFieldNumericIndexStorage { 5 + 6 + public function getApplicationName() { 7 + return 'maniphest'; 8 + } 9 + 10 + } 11 +
+11
src/applications/maniphest/storage/ManiphestCustomFieldStorage.php
··· 1 + <?php 2 + 3 + final class ManiphestCustomFieldStorage 4 + extends PhabricatorCustomFieldStorage { 5 + 6 + public function getApplicationName() { 7 + return 'maniphest'; 8 + } 9 + 10 + } 11 +
+11
src/applications/maniphest/storage/ManiphestCustomFieldStringIndex.php
··· 1 + <?php 2 + 3 + final class ManiphestCustomFieldStringIndex 4 + extends PhabricatorCustomFieldStringIndexStorage { 5 + 6 + public function getApplicationName() { 7 + return 'maniphest'; 8 + } 9 + 10 + } 11 +
+4
src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php
··· 1596 1596 'type' => 'sql', 1597 1597 'name' => $this->getPatchPath('20130914.usercustom.sql'), 1598 1598 ), 1599 + '20130915.maniphestcustom.sql' => array( 1600 + 'type' => 'sql', 1601 + 'name' => $this->getPatchPath('20130915.maniphestcustom.sql'), 1602 + ), 1599 1603 ); 1600 1604 } 1601 1605 }