Changeset View
Changeset View
Standalone View
Standalone View
resources/sql/autopatches/20140722.audit.3.miginlines.php
Show All 16 Lines | |||||
foreach ($rows as $row) { | foreach ($rows as $row) { | ||||
$id = $row['id']; | $id = $row['id']; | ||||
echo pht('Migrating inline #%d...', $id); | echo pht('Migrating inline #%d...', $id); | ||||
if ($row['auditCommentID']) { | if ($row['auditCommentID']) { | ||||
$xaction_phid = PhabricatorPHID::generateNewPHID( | $xaction_phid = PhabricatorPHID::generateNewPHID( | ||||
PhabricatorApplicationTransactionTransactionPHIDType::TYPECONST, | PhabricatorApplicationTransactionTransactionPHIDType::TYPECONST, | ||||
PhabricatorRepositoryCommitPHIDType::TYPECONST); | DiffusionCommitPHIDType::TYPECONST); | ||||
} else { | } else { | ||||
$xaction_phid = null; | $xaction_phid = null; | ||||
} | } | ||||
$comment_phid = PhabricatorPHID::generateNewPHID( | $comment_phid = PhabricatorPHID::generateNewPHID( | ||||
PhabricatorPHIDConstants::PHID_TYPE_XCMT, | PhabricatorPHIDConstants::PHID_TYPE_XCMT, | ||||
PhabricatorRepositoryCommitPHIDType::TYPECONST); | DiffusionCommitPHIDType::TYPECONST); | ||||
queryfx( | queryfx( | ||||
$conn_w, | $conn_w, | ||||
'INSERT IGNORE INTO %T | 'INSERT IGNORE INTO %T | ||||
(id, phid, transactionPHID, authorPHID, viewPolicy, editPolicy, | (id, phid, transactionPHID, authorPHID, viewPolicy, editPolicy, | ||||
commentVersion, content, contentSource, isDeleted, | commentVersion, content, contentSource, isDeleted, | ||||
dateCreated, dateModified, commitPHID, pathID, | dateCreated, dateModified, commitPHID, pathID, | ||||
isNewFile, lineNumber, lineLength, hasReplies, legacyCommentID) | isNewFile, lineNumber, lineLength, hasReplies, legacyCommentID) | ||||
Show All 37 Lines |