@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at recaptime-dev/main 60 lines 1.7 kB view raw
1<?php 2 3$conn_w = id(new PhabricatorAuditTransaction())->establishConnection('w'); 4$rows = new LiskRawMigrationIterator($conn_w, 'audit_comment'); 5 6$content_source = PhabricatorContentSource::newForSource( 7 PhabricatorOldWorldContentSource::SOURCECONST)->serialize(); 8 9echo pht('Migrating Audit comment text to modern storage...')."\n"; 10foreach ($rows as $row) { 11 $id = $row['id']; 12 echo pht('Migrating Audit comment %d...', $id)."\n"; 13 if (!strlen($row['content'])) { 14 echo pht('Comment has no text, continuing.')."\n"; 15 continue; 16 } 17 18 $xaction_phid = PhabricatorPHID::generateNewPHID( 19 PhabricatorApplicationTransactionTransactionPHIDType::TYPECONST, 20 PhabricatorRepositoryCommitPHIDType::TYPECONST); 21 22 $comment_phid = PhabricatorPHID::generateNewPHID( 23 PhabricatorPHIDConstants::PHID_TYPE_XCMT, 24 PhabricatorRepositoryCommitPHIDType::TYPECONST); 25 26 queryfx( 27 $conn_w, 28 'INSERT IGNORE INTO %T 29 (phid, transactionPHID, authorPHID, viewPolicy, editPolicy, 30 commentVersion, content, contentSource, isDeleted, 31 dateCreated, dateModified, commitPHID, pathID, 32 legacyCommentID) 33 VALUES (%s, %s, %s, %s, %s, 34 %d, %s, %s, %d, 35 %d, %d, %s, %nd, 36 %d)', 37 'audit_transaction_comment', 38 39 // phid, transactionPHID, authorPHID, viewPolicy, editPolicy 40 $comment_phid, 41 $xaction_phid, 42 $row['actorPHID'], 43 'public', 44 $row['actorPHID'], 45 46 // commentVersion, content, contentSource, isDeleted 47 1, 48 $row['content'], 49 $content_source, 50 0, 51 52 // dateCreated, dateModified, commitPHID, pathID, legacyCommentID 53 $row['dateCreated'], 54 $row['dateModified'], 55 $row['targetPHID'], 56 null, 57 $row['id']); 58} 59 60echo pht('Done.')."\n";