Undo D6266 (DifferentialComment PHID migration)
Summary: Ref T2222. My path forward here wasn't very good -- I was thinking I could set `transactionPHID` for the inline comments as I migrated, but it must be unique and an individual DifferentialComment may have more than one inline comment. Dropping the unique requirement just creates more issues for us, not fewer. So the migration in D6266 isn't actually useful. Undo it -- this can't be a straight revert because some installs may already have upgraded. Test Plan: Ran new migrations, verified the world ended up back in the same place as before (made comments, viewed reivsions). Reviewers: btrahan Reviewed By: btrahan CC: wez, aran Maniphest Tasks: T2222 Differential Revision: https://secure.phabricator.com/D6269
This commit is contained in:
@@ -1,23 +1,3 @@
|
||||
<?php
|
||||
|
||||
$conn = id(new DifferentialRevision())->establishConnection('r');
|
||||
|
||||
echo "Assigning transaction PHIDs to DifferentialComments.\n";
|
||||
foreach (new LiskRawMigrationIterator($conn, 'differential_comment') as $row) {
|
||||
$id = $row['id'];
|
||||
echo "Migrating comment #{$id}...\n";
|
||||
if ($row['phid']) {
|
||||
continue;
|
||||
}
|
||||
|
||||
queryfx(
|
||||
$conn,
|
||||
'UPDATE %T SET phid = %s WHERE id = %d',
|
||||
'differential_comment',
|
||||
PhabricatorPHID::generateNewPHID(
|
||||
PhabricatorPHIDConstants::PHID_TYPE_XACT,
|
||||
PhabricatorPHIDConstants::PHID_TYPE_DREV),
|
||||
$id);
|
||||
}
|
||||
|
||||
echo "Done.\n";
|
||||
// This patch is unnecessary and was nuked.
|
||||
|
||||
Reference in New Issue
Block a user