From 3e676bce9eda1ab659450a9e72b5b9a4dc31aa81 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 17 Apr 2020 05:30:55 -0700 Subject: [PATCH] No-op an ancient Paste edge migration which no longer functions after a database rename Summary: Fixes T13510. This migration currently fails because it tries to affect the "paste" database, but when it runs this database will be named "pastebin". Since the cost of fixing it in place or moving it past the rename migration both seem relatively high (and the cost of throwing it away is plausibly zero) just throw it for now. Test Plan: Looked at file, saw no more code that can execute. Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam Maniphest Tasks: T13510 Differential Revision: https://secure.phabricator.com/D21132 --- .../autopatches/20160223.paste.fileedges.php | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/resources/sql/autopatches/20160223.paste.fileedges.php b/resources/sql/autopatches/20160223.paste.fileedges.php index 915a2fcd0e..73254e1eb3 100644 --- a/resources/sql/autopatches/20160223.paste.fileedges.php +++ b/resources/sql/autopatches/20160223.paste.fileedges.php @@ -4,18 +4,8 @@ // underlying file data were not written correctly. This restores edges for // any missing pastes. -$table = new PhabricatorPaste(); -$edge_type = PhabricatorObjectHasFileEdgeType::EDGECONST; - -foreach (new LiskMigrationIterator($table) as $paste) { - $paste_phid = $paste->getPHID(); - $file_phid = $paste->getFilePHID(); - - if (!$file_phid) { - continue; - } - - id(new PhabricatorEdgeEditor()) - ->addEdge($paste_phid, $edge_type, $file_phid) - ->save(); -} +// See T13510. The "pastebin" database was later renamed to "paste", which +// broke this migration. The migration was removed in 2020 since it seems +// plausible that zero installs are impacted (only installs that ran code +// from November 2015 and have not upgraded in five years could possibly be +// impacted). -- 2.51.2