mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Remove blameRevision and revertPlan from the DifferentialRevision schema
Summary: These fields use auxiliary storage now. Migrate the data and get rid of the columns in the main table. - This might take a little while to run, although there are <500k rows so probably not too long. - Maybe grab a backup of the table first, if I screwed something up this will delete the data in these fields. Test Plan: - Ran migration locally. - Browsed Differential. - Grepped for "revertPlan" and "blameRevision". Reviewers: jungejason, tuomaspelkonen, aran Reviewed By: jungejason CC: aran, jungejason, epriestley Differential Revision: 832
This commit is contained in:
parent
8f3b342287
commit
e875c81f6d
4 changed files with 20 additions and 10 deletions
20
resources/sql/patches/072.blamerevert.sql
Normal file
20
resources/sql/patches/072.blamerevert.sql
Normal file
|
@ -0,0 +1,20 @@
|
|||
INSERT INTO phabricator_differential.differential_auxiliaryfield
|
||||
(revisionPHID, name, value, dateCreated, dateModified)
|
||||
SELECT phid, 'phabricator:blame-revision', blameRevision,
|
||||
dateCreated, dateModified
|
||||
FROM phabricator_differential.differential_revision
|
||||
WHERE blameRevision != '';
|
||||
|
||||
ALTER TABLE phabricator_differential.differential_revision
|
||||
DROP blameRevision;
|
||||
|
||||
|
||||
INSERT INTO phabricator_differential.differential_auxiliaryfield
|
||||
(revisionPHID, name, value, dateCreated, dateModified)
|
||||
SELECT phid, 'phabricator:revert-plan', revertPlan,
|
||||
dateCreated, dateModified
|
||||
FROM phabricator_differential.differential_revision
|
||||
WHERE revertPlan != '';
|
||||
|
||||
ALTER TABLE phabricator_differential.differential_revision
|
||||
DROP revertPlan;
|
|
@ -91,8 +91,6 @@ class ConduitAPI_differential_getrevision_Method extends ConduitAPIMethod {
|
|||
$revision->getStatus()),
|
||||
'summary' => $revision->getSummary(),
|
||||
'testPlan' => $revision->getTestPlan(),
|
||||
'revertPlan' => $revision->getRevertPlan(),
|
||||
'blameRevision' => $revision->getBlameRevision(),
|
||||
'lineCount' => $revision->getLineCount(),
|
||||
'reviewerPHIDs' => $reviewer_phids,
|
||||
'diffs' => $diff_dicts,
|
||||
|
|
|
@ -175,12 +175,6 @@ class DifferentialRevisionEditor {
|
|||
if ($revision->getAuthorPHID() === null) {
|
||||
$revision->setAuthorPHID($this->getActorPHID());
|
||||
}
|
||||
if ($revision->getRevertPlan() === null) {
|
||||
$revision->setRevertPlan('');
|
||||
}
|
||||
if ($revision->getBlameRevision() === null) {
|
||||
$revision->setBlameRevision('');
|
||||
}
|
||||
if ($revision->getSummary() === null) {
|
||||
$revision->setSummary('');
|
||||
}
|
||||
|
|
|
@ -23,8 +23,6 @@ class DifferentialRevision extends DifferentialDAO {
|
|||
|
||||
protected $summary;
|
||||
protected $testPlan;
|
||||
protected $revertPlan;
|
||||
protected $blameRevision;
|
||||
|
||||
protected $phid;
|
||||
protected $authorPHID;
|
||||
|
|
Loading…
Reference in a new issue