Page MenuHomestyx hydra

No OneTemporary

diff --git a/resources/sql/autopatches/20160223.paste.fileedges.php b/resources/sql/autopatches/20160223.paste.fileedges.php
new file mode 100644
index 0000000000..915a2fcd0e
--- /dev/null
+++ b/resources/sql/autopatches/20160223.paste.fileedges.php
@@ -0,0 +1,21 @@
+<?php
+
+// For a while in November 2015, attachment edges between pastes and their
+// 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();
+}

File Metadata

Mime Type
text/x-diff
Expires
Tue, Mar 17, 1:24 AM (13 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
963072
Default Alt Text
(833 B)

Event Timeline