mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Add viewPolicy, editPolicy, repositoryPHID columns to DifferentialRevision
Summary: Ref T603. Paves the way for policy controls. Test Plan: Ran storage upgrade, bumbled around in Differential. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T603 Differential Revision: https://secure.phabricator.com/D7133
This commit is contained in:
parent
79abe6653e
commit
c458517cb4
3 changed files with 24 additions and 0 deletions
17
resources/sql/patches/20130925.xpolicy.sql
Normal file
17
resources/sql/patches/20130925.xpolicy.sql
Normal file
|
@ -0,0 +1,17 @@
|
|||
ALTER TABLE {$NAMESPACE}_differential.differential_revision
|
||||
ADD viewPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin;
|
||||
|
||||
ALTER TABLE {$NAMESPACE}_differential.differential_revision
|
||||
ADD editPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin;
|
||||
|
||||
UPDATE {$NAMESPACE}_differential.differential_revision
|
||||
SET viewPolicy = 'users' WHERE viewPolicy = '';
|
||||
|
||||
UPDATE {$NAMESPACE}_differential.differential_revision
|
||||
SET editPolicy = 'users' WHERE editPolicy = '';
|
||||
|
||||
ALTER TABLE {$NAMESPACE}_differential.differential_revision
|
||||
ADD repositoryPHID VARCHAR(64) COLLATE utf8_bin;
|
||||
|
||||
ALTER TABLE {$NAMESPACE}_differential.differential_revision
|
||||
ADD KEY (repositoryPHID);
|
|
@ -25,6 +25,9 @@ final class DifferentialRevision extends DifferentialDAO
|
|||
protected $mailKey;
|
||||
protected $branchName;
|
||||
protected $arcanistProjectPHID;
|
||||
protected $repositoryPHID;
|
||||
protected $viewPolicy = PhabricatorPolicies::POLICY_USER;
|
||||
protected $editPolicy = PhabricatorPolicies::POLICY_USER;
|
||||
|
||||
private $relationships = self::ATTACHABLE;
|
||||
private $commits = self::ATTACHABLE;
|
||||
|
|
|
@ -1632,6 +1632,10 @@ final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList {
|
|||
'type' => 'sql',
|
||||
'name' => $this->getPatchPath('20130925.mpolicy.sql'),
|
||||
),
|
||||
'20130925.xpolicy.sql' => array(
|
||||
'type' => 'sql',
|
||||
'name' => $this->getPatchPath('20130925.xpolicy.sql'),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue