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

Allow owners paths to be arbitrarily long and add storage for display paths

Summary:
Depends on D19182. Ref T11015. This changes `path` from `text255` to `longtext` because paths may be arbitrarily long.

It adds `pathDisplay` to prepare for display paths and storage paths having different values. For now, `pathDisplay` is copied from `path` and always has the same value.

Test Plan:
- Ran migration, checked database for sanity (all `pathDisplay` and `path` values identical).
- Added new paths, saw `pathDisplay` and `path` get the same values.
- Added an unreasonably enormous path with far more than 255 characters.

Maniphest Tasks: T11015

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

+10 -1
+2
resources/sql/autopatches/20180306.opath.05.longpath.sql
··· 1 + ALTER TABLE {$NAMESPACE}_owners.owners_path 2 + CHANGE path path LONGTEXT NOT NULL COLLATE {$COLLATE_TEXT};
+2
resources/sql/autopatches/20180306.opath.06.pathdisplay.sql
··· 1 + ALTER TABLE {$NAMESPACE}_owners.owners_path 2 + ADD pathDisplay LONGTEXT NOT NULL COLLATE {$COLLATE_TEXT};
+2
resources/sql/autopatches/20180306.opath.07.copypaths.sql
··· 1 + UPDATE {$NAMESPACE}_owners.owners_path 2 + SET pathDisplay = path WHERE pathDisplay = '';
+4 -1
src/applications/owners/storage/PhabricatorOwnersPath.php
··· 6 6 protected $repositoryPHID; 7 7 protected $pathIndex; 8 8 protected $path; 9 + protected $pathDisplay; 9 10 protected $excluded; 10 11 11 12 private $fragments; ··· 15 16 return array( 16 17 self::CONFIG_TIMESTAMPS => false, 17 18 self::CONFIG_COLUMN_SCHEMA => array( 18 - 'path' => 'text255', 19 + 'path' => 'text', 20 + 'pathDisplay' => 'text', 19 21 'pathIndex' => 'bytes12', 20 22 'excluded' => 'bool', 21 23 ), ··· 36 38 37 39 $path->pathIndex = PhabricatorHash::digestForIndex($raw_path); 38 40 $path->path = $raw_path; 41 + $path->pathDisplay = $raw_path; 39 42 40 43 $path->excluded = $ref['excluded']; 41 44