1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 13:00:56 +01:00
phorge-phorge/resources/sql/patches/20130925.xpolicy.sql
epriestley c458517cb4 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
2013-09-26 12:36:30 -07:00

17 lines
646 B
SQL

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);