mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 03:20:59 +01:00
Allow Owners packages to have arbitrarily long names
Summary: - Change column type from `sort128` to `sort`. - Remove `originalName`. This column is unused. Long ago, we used it to generate a `Thread-Topic` header for mail, but just use PHIDs now (the value just needs to be stable for a given object, users normally don't see it). Test Plan: - Created a package with a beautifully long name. Magnificent! - Grepped for `originalName` / `getOriginalName()`, found no Owners hits. - Verified that there isn't any name-length validation code to remove. {F4925637} Reviewers: chad, amckinley Reviewed By: chad Differential Revision: https://secure.phabricator.com/D17798
This commit is contained in:
parent
85ff1d5c2d
commit
d2baa88171
2 changed files with 3 additions and 6 deletions
2
resources/sql/autopatches/20170427.owners.01.long.sql
Normal file
2
resources/sql/autopatches/20170427.owners.01.long.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE {$NAMESPACE}_owners.owners_package
|
||||
DROP originalName;
|
|
@ -12,7 +12,6 @@ final class PhabricatorOwnersPackage
|
|||
PhabricatorNgramsInterface {
|
||||
|
||||
protected $name;
|
||||
protected $originalName;
|
||||
protected $auditingEnabled;
|
||||
protected $autoReview;
|
||||
protected $description;
|
||||
|
@ -105,8 +104,7 @@ final class PhabricatorOwnersPackage
|
|||
self::CONFIG_TIMESTAMPS => false,
|
||||
self::CONFIG_AUX_PHID => true,
|
||||
self::CONFIG_COLUMN_SCHEMA => array(
|
||||
'name' => 'sort128',
|
||||
'originalName' => 'text255',
|
||||
'name' => 'sort',
|
||||
'description' => 'text',
|
||||
'primaryOwnerPHID' => 'phid?',
|
||||
'auditingEnabled' => 'bool',
|
||||
|
@ -137,9 +135,6 @@ final class PhabricatorOwnersPackage
|
|||
|
||||
public function setName($name) {
|
||||
$this->name = $name;
|
||||
if (!$this->getID()) {
|
||||
$this->originalName = $name;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue