mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 21:02:41 +01:00
e875c81f6d
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
20 lines
740 B
SQL
20 lines
740 B
SQL
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;
|