Skip to content

Commit 3e676bc

Browse files
author
epriestley
committedApr 17, 2020
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
1 parent ef1340b commit 3e676bc

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed
 

‎resources/sql/autopatches/20160223.paste.fileedges.php

+5-15
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,8 @@
44
// underlying file data were not written correctly. This restores edges for
55
// any missing pastes.
66

7-
$table = new PhabricatorPaste();
8-
$edge_type = PhabricatorObjectHasFileEdgeType::EDGECONST;
9-
10-
foreach (new LiskMigrationIterator($table) as $paste) {
11-
$paste_phid = $paste->getPHID();
12-
$file_phid = $paste->getFilePHID();
13-
14-
if (!$file_phid) {
15-
continue;
16-
}
17-
18-
id(new PhabricatorEdgeEditor())
19-
->addEdge($paste_phid, $edge_type, $file_phid)
20-
->save();
21-
}
7+
// See T13510. The "pastebin" database was later renamed to "paste", which
8+
// broke this migration. The migration was removed in 2020 since it seems
9+
// plausible that zero installs are impacted (only installs that ran code
10+
// from November 2015 and have not upgraded in five years could possibly be
11+
// impacted).

0 commit comments

Comments
 (0)
Failed to load comments.