diff --git a/resources/sql/autopatches/20180306.opath.05.longpath.sql b/resources/sql/autopatches/20180306.opath.05.longpath.sql new file mode 100644 index 0000000000..79ff2f7a7f --- /dev/null +++ b/resources/sql/autopatches/20180306.opath.05.longpath.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_owners.owners_path + CHANGE path path LONGTEXT NOT NULL COLLATE {$COLLATE_TEXT}; diff --git a/resources/sql/autopatches/20180306.opath.06.pathdisplay.sql b/resources/sql/autopatches/20180306.opath.06.pathdisplay.sql new file mode 100644 index 0000000000..b9b336ecd7 --- /dev/null +++ b/resources/sql/autopatches/20180306.opath.06.pathdisplay.sql @@ -0,0 +1,2 @@ +ALTER TABLE {$NAMESPACE}_owners.owners_path + ADD pathDisplay LONGTEXT NOT NULL COLLATE {$COLLATE_TEXT}; diff --git a/resources/sql/autopatches/20180306.opath.07.copypaths.sql b/resources/sql/autopatches/20180306.opath.07.copypaths.sql new file mode 100644 index 0000000000..74ebecfa9a --- /dev/null +++ b/resources/sql/autopatches/20180306.opath.07.copypaths.sql @@ -0,0 +1,2 @@ +UPDATE {$NAMESPACE}_owners.owners_path + SET pathDisplay = path WHERE pathDisplay = ''; diff --git a/src/applications/owners/storage/PhabricatorOwnersPath.php b/src/applications/owners/storage/PhabricatorOwnersPath.php index 7e7822df1a..6c49023e69 100644 --- a/src/applications/owners/storage/PhabricatorOwnersPath.php +++ b/src/applications/owners/storage/PhabricatorOwnersPath.php @@ -6,6 +6,7 @@ final class PhabricatorOwnersPath extends PhabricatorOwnersDAO { protected $repositoryPHID; protected $pathIndex; protected $path; + protected $pathDisplay; protected $excluded; private $fragments; @@ -15,7 +16,8 @@ final class PhabricatorOwnersPath extends PhabricatorOwnersDAO { return array( self::CONFIG_TIMESTAMPS => false, self::CONFIG_COLUMN_SCHEMA => array( - 'path' => 'text255', + 'path' => 'text', + 'pathDisplay' => 'text', 'pathIndex' => 'bytes12', 'excluded' => 'bool', ), @@ -36,6 +38,7 @@ final class PhabricatorOwnersPath extends PhabricatorOwnersDAO { $path->pathIndex = PhabricatorHash::digestForIndex($raw_path); $path->path = $raw_path; + $path->pathDisplay = $raw_path; $path->excluded = $ref['excluded'];